[IPython-user] IPython locks file being edited.
Mon Feb 19 20:55:55 CST 2007
On 2/19/07, Paul Smith <firstname.lastname@example.org> wrote:
> I'm having a fairly frequent problem after a program crashes in IPython,
> that I can no longer save the file in the editor I'm using. I'm using
> IPython 0.7.3 and Crimson editor 3.70. So if I make some silly typo, run the
> program and it stops, go back and edit and then save, the crimson editor
> comes back with "Access to an unnamed file was denied". I can reproduce this
> behaviour for SyntaxError exceptions, and it seems to be related to some
> empty MFCnn.tmp files that are created in the same directory as the code. If
> I close IPython I can then save the file. I don't think this ever happened
> in previous IPython versions. Also I'm not launching the Crimson from
> ipython's command line edit, I start it up separately.
I'm afraid I can't be of any assistance here: the problem you describe
sounds very much like a win32 situation, since that kind of behavior
doesn't occur under POSIX. My infinite ignorance of all things win32
is well known around here, so I don't really know what can be going
on. IPython has no explicit code to create temporary files named
MFCnn.tmp, and the only temp files it makes are created when using the
%edit magic, which you claim not to be using.
Also, note that the code used by %run (iplib.safe_execfile) does an
explicit file .close() before actually running your program, so it
certainly isn't leaving your edited file with a dangling open that
might (I don't know) make win32 unhappy.
I hope our resident win32 gurus may be able to help.
More information about the IPython-user