[IPython-user] bug in edit magic: content of edited file is not accessible
Alexander Belchenko
bialix at ukr.net
Wed Jan 11 17:37:11 CST 2006
In 0.6.15 when I edit file with edit magic command I've got content of
edited file in last Out variable. In 0.7.0 this is broken: after editing
code was executed but text is not accessible as _X variable. Is this
intended behaviour? I think it's a bug.
Below my session that illustrate this behaviour. As you can see in dir()
output there was no _1 variable at all.
-----------------------------------------------------------------------
Python 2.4.2 (#67, Sep 28 2005, 12:41:11) [MSC v.1310 32 bit (Intel)]
Type "copyright", "credits" or "license" for more information.
IPython 0.7.0 -- An enhanced Interactive Python.
? -> Introduction to IPython's features.
%magic -> Information about IPython's 'magic' % functions.
help -> Python's own help system.
object? -> Details about 'object'. ?object also works, ?? prints more.
In [1]: edit
IPython will make a temporary file named:
c:\docume~1\bialix\locals~1\temp\ipython_edit_loimcf.py
Editing... done. Executing edited code...
spam
In [2]: dir
Out[2]: <built-in function dir>
In [3]: dir()
Out[3]:
['In',
'Out',
'_',
'_2',
'__',
'__IP',
'___',
'__builtins__',
'__name__',
'__nonzero__',
'_dh',
'_i',
'_i1',
'_i2',
'_i3',
'_ih',
'_ii',
'_iii',
'_oh',
'help',
's']
--
Alexander
More information about the IPython-user
mailing list