[IPython-user] %edit <object> unable to read tmp file created previously with %edit
Tue Jan 6 23:17:08 CST 2009
I've recently (not exactly sure when it broke) run into a hiccup with the
%edit magic command.
I can %ed an empty file fine, but I can't %ed an object defined in that
$ uname -a
Linux lothario 2.6.24-22-generic #1 SMP Mon Nov 24 19:35:06 UTC 2008 x86_64
I'm on ubuntu 8.04, 64 bit.
Python 2.5.2 (r252:60911, Jul 31 2008, 17:31:22)
Type "copyright", "credits" or "license" for more information.
IPython 0.9.1 -- An enhanced Interactive Python.
? -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help -> Python's own help system.
object? -> Details about 'object'. ?object also works, ?? prints more.
In : ed
IPython will make a temporary file named: /tmp/ipython_edit_Z2cUBh.py
Editing... done. Executing edited code...
Out: 'class foo(object):\n pass\n'
In : foo()
Out: <__main__.foo object at 0x7ffecb766d90>
In : foo
Out: <class '__main__.foo'>
In : ed foo
WARNING: The file `None` where `<class '__main__.foo'>` was defined cannot
In : ls /tmp/ipython_edit_Z2cUBh.py
In : ls -l /tmp/ipython_edit_Z2cUBh.py
-rw-r--r-- 1 ksmith ksmith 28 2009-01-06 23:11 /tmp/ipython_edit_Z2cUBh.py
For some reason it can't find the /tmp file where 'foo' was defined, even
though the file does exist and I have full read/write permissions. Not
knowing the internals of the %edit command, I'm not sure how to proceed.
Checking the mailing lists didn't yield many results.
Thanks for your help,
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the IPython-user