[IPython-user] IPython locks file being edited.
Mon Feb 19 22:30:31 CST 2007
> -----Original Message-----
> From: Fernando Perez [mailto:firstname.lastname@example.org]
> Sent: Tuesday, 20 February 2007 1:56 PM
> To: Paul Smith
> Cc: email@example.com
> Subject: Re: [IPython-user] IPython locks file being edited.
> 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
> > 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
> > 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
> > 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.
Oops! I totally forgot to mention I'm using Win XP. So you're likely right
it being a win32 issue Fernando, though maybe in conjunction with Crimson
(see below)? On playing around with it a little more, I tried starting
ipython and crashing the program, then starting Crimson (not with %edit) and
try saving. This still results in the "access denied" msg even if no editing
is done first. It's at that point the MFC.tmp files are created, so that
appears to be Crimson's doing. Next I tried editing and saving in notepad,
no problem! (well, other than notepad is crap). So my solution for now is to
switch to Notepad++ which also seems to work fine and looks like it has all
the features I want. Curious though, what's going on with win32/Crimson?
More information about the IPython-user