[IPython-user] auto_edit problems
davbrow at gmail.com
Tue Jan 31 15:42:44 CST 2006
On 1/31/06, Fernando Perez <Fernando.Perez at colorado.edu> wrote:
> Dave wrote:
> > I still get "Return to editor to correct syntax error? [Y/n] n"
> > when I have syntax errors since upgrading to 0.7.0. The 0.7.1 version
> > to do the same thing. I added
> > autoedit_syntax 0
> > to my startup file (ipythonrc.ini) but still get the message.
> > I'm running on WIN XP.
> > Would love to turn this off since it is not of much help when you have
> > external editor already open for the file.
> > Is there a simple edit I can do to a ipython module to disable this for
> Mmh, that's very strange: the setting is honored for me:
> In : __IP.rc.autoedit_syntax=0
> In : edit
> IPython will make a temporary file named: /tmp/ipython_edit_rnvW85.py
> File "/tmp/ipython_edit_rnvW85.py", line 1
> 12qsda f
> SyntaxError: invalid syntax
> WARNING: Failure executing file: </tmp/ipython_edit_rnvW85.py>
> done. Executing edited code...
> Out: '12qsda f\n'
> Try typing %config to see your config settings, and check that it's really
> being picked up as '0'. Also try resetting it at runtime as above, and
> see if
> it helps. Basically we need to clarify whether the problem is with the
> ipython internals, or whether you are picking up a different config from
Here's my %config output (excerpt below). This is a handy magic I didn't
know about. Actually I was able to find the problem using %config and your
suggestions. The autoedit_syntax 0 was not being picked up because a
different ipythonrc.ini was being used than I expected. I seem to have both
a .ipython directory and a _ipython directory. I thought .ipython was where
the startup files were located. But the %config shows ipythondir set to
'_ipython'. So it looks like the autoedit_syntax issue was just my
misunderstanding. It seems to be turned off properly now. Thanks for your
Is this startup files location specific to WIN systems? On unix or OSX it
still looks in .ipython in user's dir, correct? I'm assuming I need to
delete the whole .ipython dir on WIN XP.
In : %config
Current configuration structure:
'ipythondir': 'C:\\Documents and Settings\\david\\_ipython',
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the IPython-user