Jeremy Todd
Jeremy Todd
I just ran into this too. I think it's just the import of ipdb which prevents pickle from pickling any functions defined in __main__. See this IPython bug (still open...
That's reasonable I suppose, but now ipdb is preventing a pretty simple use case: a single file run as a script which wants to use multiprocessing.Pool (which requires the pickling...
Well we could do what I'm doing inside ipdb itself: we could save `sys.modules['__main__']` before importing anything from IPython, then restore it. I think this will have some effect on...