[IPython-dev] Confused about ipython.parallel namespaces

MinRK benjaminrk at gmail.com
Tue Mar 4 15:46:59 EST 2014


On Tue, Mar 4, 2014 at 12:37 PM, Dinesh Vadhia <dineshvadhia at outlook.com>
wrote:

 I thought that dview.sync_imports() imported modules into the namespace of
> each engine.  How do you make "that.py" be in the current working
> directory of the engines for the import to be successful?  Thanks.
>
That is what it does. It performs the same import locally and on all
engines. What it does not do is send local modules to the engines before
importing them. Are your engines running on your local machine? If so, you
can ensure the engines are running in the same cwd as the client:

rc[:]['cwd'] = os.getcwd()
rc[:]execute("import os; os.chdir(cwd)")


>
> _______________________________________________
> IPython-dev mailing list
> IPython-dev at scipy.org
> http://mail.scipy.org/mailman/listinfo/ipython-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20140304/32951a7d/attachment.html>


More information about the IPython-dev mailing list