[IPython-user] cluster file syntax

Brian Granger bgranger at scu.edu
Thu Mar 16 11:55:51 CST 2006


Jonathan,

The files are simply a pickled python list.  In the future we will
probably have these files be something that is human readable.  But
for now the best way of creating them is to use the save() method of
the InteractiveCluster class once you have a running cluster:

If you have 2 kernels running on localhost on ports 10106 and 10107:

>>> ic = InteractiveCluster()
>>> kernels = [('127.0.0.1',10106),('127.0.0.1',10107)]
>>> ic.start(kernels)
>>> ic.save("mycluster")

This writes the pickled kernel list to a file in your ~/.ipython
directory and it can be reloaded later:

>>> ic.load("mycluster")

It would not be difficult to have the information stored in a
different format.  To see what we are doing now, check out the code
for the save() method in kernelclient.py.  Eventually, these files
will be handled by the IPython configuration system which is also
being redesigned.

Brian

On 3/16/06, Jonathan Taylor <jonathan.taylor at stanford.edu> wrote:
> hi,
>
> i've been playing with the ipkernel demos and was curious about
> the format of the "cluster_*" files.
>
> it seems they're binary (at least the example i have is). while they're
> small, i was
> curious how one goes about creating their own...
>
> thanks,
>
> jonathan
>
> --
> ------------------------------------------------------------------------
> I'm part of the Team in Training: please support our efforts for the
> Leukemia and Lymphoma Society!
>
> http://www.active.com/donate/tntsvmb/tntsvmbJTaylor
>
> GO TEAM !!!
>
> ------------------------------------------------------------------------
> Jonathan Taylor                           Tel:   650.723.9230
> Dept. of Statistics                       Fax:   650.725.8977
> Sequoia Hall, 137                         www-stat.stanford.edu/~jtaylo
> 390 Serra Mall
> Stanford, CA 94305
>
> _______________________________________________
> IPython-user mailing list
> IPython-user at scipy.net
> http://scipy.net/mailman/listinfo/ipython-user
>
> This message scanned for viruses and SPAM at SCU (MGW2)
>


--
Brian Granger
Santa Clara University
ellisonbg at gmail.com




More information about the IPython-user mailing list