[SciPy-user] Multiprocessing, GUIs and IPython

Robert Kern robert.kern at gmail.com
Wed Jan 7 15:49:29 EST 2009


On Wed, Jan 7, 2009 at 15:35, Brian Granger <ellisonbg.net at gmail.com> wrote:

>> It would be great if IPython could sort out the pickle business so you
>> could pickle interactively defined functions (they currently don't
>> show up in __main__ which is a FakeModule instance).
>
> Isn't the problem pickle itself though?  It is my understanding that
> interactive functions can't be pickled, even in regular python.  How
> does multiprocessing get around this?

In the regular interpreter, the functions are in the __main__ module,
which the subprocess inherits (on UNIX and if the function is defined
before forking).

The FakeModule business is really the culprit in IPython. Which is a
shame, because the comments for that class lead one to believe that it
exists to support pickling.

-- 
Robert Kern

"I have come to believe that the whole world is an enigma, a harmless
enigma that is made terrible by our own mad attempt to interpret it as
though it had an underlying truth."
  -- Umberto Eco



More information about the SciPy-User mailing list