[IPython-dev] Auto-discard notification
david.huard at gmail.com
Thu Jan 18 15:03:11 CST 2007
Ok, now I can push the module, but the import fails.
So for instance
>>> from tests import model_1
Locating the module...
Module (model_1) found in:
[127.0.0.1:0] In : os.system('tar -xf model_1.tar')
[127.0.0.1:0] Out: 0
[127.0.0.1:1] In : os.system('tar -xf model_1.tar')
[127.0.0.1:1] Out: 0
[127.0.0.1:2] In : os.system('tar -xf model_1.tar')
[127.0.0.1:2] Out: 0
[127.0.0.1:3] In : os.system('tar -xf model_1.tar')
[127.0.0.1:3] Out: 0
>>> rc.executeAll('import model_1')
[127.0.0.1:1] In : import model_1
Traceback (most recent call last):
File "<console>", line 1, in ?
ImportError: No module named model_1
The model_1.tar file is in the local directory, but the engines doesn't seem
to find the module on their side.
Where do the engines live ? rc.executeAll('os.getcwd()') return the local
dir, but the engines themselves must be elsewhere, since they can't find the
P.S. Fernando, don't bother sending the patch, svn checking is easier for
both of us.
2007/1/18, Fernando Perez <Fernando.Perez at colorado.edu>:
> David Huard wrote:
> > Thanks a lot Fernando,
> > Effectively, it doesn't seem to work, unless I'm doing something wrong.
> Small bug, here's the fix. Let me know if it works (as you noticed, this
> has seen precious little testing):
> Index: ipython1/kernel/controllervanilla.py
> --- ipython1/kernel/controllervanilla.py (revision 2018)
> +++ ipython1/kernel/controllervanilla.py (working copy)
> @@ -169,7 +169,7 @@
> self.executeAll("tar_file = open('%s','wb')" % \
> - tarball_name, block=False)
> + tarballName, block=False)
> self.executeAll("tar_file.write(tar_fileString)", block=False)
> self.executeAll("tar_file.close()", block=False)
> self.executeAll("import os", block=False)
> I've already committed it, so you can either apply it manually or update
> SVN checkout.
> For future discussions on this, I'd really appreciate it if you could use
> list. Much of this code has not been written by me directly, so it's
> that we get other developers' feedback as well.
> Thanks for the report!
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the IPython-dev