##// END OF EJS Templates
- Make autoedit_syntax true by default...
fperez -
Show More
@@ -1,5 +1,5 b''
1 1 # -*- Mode: Shell-Script -*- Not really, but shows comments correctly
2 # $Id: ipythonrc 923 2005-11-15 08:51:15Z fperez $
2 # $Id: ipythonrc 963 2005-12-28 19:21:29Z fperez $
3 3
4 4 #***************************************************************************
5 5 #
@@ -60,6 +60,13 b' include'
60 60
61 61 autocall 1
62 62
63 # Auto-edit syntax errors. When you use the %edit magic in ipython to edit
64 # source code (see the 'editor' variable below), it is possible that you save
65 # a file with syntax errors in it. If this variable is true, IPython will ask
66 # you whether to re-open the editor immediately to correct such an error.
67
68 autoedit_syntax 1
69
63 70 # Auto-indent. IPython can recognize lines ending in ':' and indent the next
64 71 # line, while also un-indenting automatically after 'raise' or 'return'.
65 72
@@ -6,7 +6,7 b' Requires Python 2.1 or newer.'
6 6
7 7 This file contains all the classes and helper functions specific to IPython.
8 8
9 $Id: iplib.py 962 2005-12-28 18:04:59Z fperez $
9 $Id: iplib.py 963 2005-12-28 19:21:29Z fperez $
10 10 """
11 11
12 12 #*****************************************************************************
@@ -1716,8 +1716,9 b' want to merge them back into the new files.""" % locals()'
1716 1716 print 'SyntaxError: !! is not allowed in multiline statements'
1717 1717 return pre
1718 1718 else:
1719 cmd = ("%s %s" % (iFun[1:],theRest)).replace('"','\\"')
1720 line_out = '%s%s.system("%s")' % (pre,self.name,cmd)
1719 cmd = ("%s %s" % (iFun[1:],theRest)) #.replace('"','\\"')
1720 #line_out = '%s%s.system("%s")' % (pre,self.name,cmd)
1721 line_out = '%s%s.system(r"""%s"""[:-1])' % (pre,self.name,cmd + "_")
1721 1722 #line_out = ('%s%s.system(' % (pre,self.name)) + repr(cmd) + ')'
1722 1723 else: # single-line input
1723 1724 if line.startswith('!!'):
@@ -1729,8 +1730,10 b' want to merge them back into the new files.""" % locals()'
1729 1730 return self.handle_magic('%ssx %s' % (self.ESC_MAGIC,line[2:]),
1730 1731 continue_prompt,pre,iFun,theRest)
1731 1732 else:
1732 cmd = esc_quotes(line[1:])
1733 line_out = '%s.system("%s")' % (self.name,cmd)
1733 #cmd = esc_quotes(line[1:])
1734 cmd=line[1:]
1735 #line_out = '%s.system("%s")' % (self.name,cmd)
1736 line_out = '%s.system(r"""%s"""[:-1])' % (self.name,cmd +"_")
1734 1737 #line_out = ('%s.system(' % self.name) + repr(cmd)+ ')'
1735 1738 # update cache/log and return
1736 1739 self.log(line_out,continue_prompt)
@@ -6,7 +6,7 b' Requires Python 2.1 or better.'
6 6
7 7 This file contains the main make_IPython() starter function.
8 8
9 $Id: ipmaker.py 960 2005-12-28 06:51:01Z fperez $"""
9 $Id: ipmaker.py 963 2005-12-28 19:21:29Z fperez $"""
10 10
11 11 #*****************************************************************************
12 12 # Copyright (C) 2001-2004 Fernando Perez. <fperez@colorado.edu>
@@ -177,6 +177,7 b" object? -> Details about 'object'. ?object also works, ?? prints more."
177 177 # Set sensible command line defaults.
178 178 # This should have everything from cmdline_opts and cmdline_only
179 179 opts_def = Struct(autocall = 1,
180 autoedit_syntax = 1,
180 181 autoindent=0,
181 182 automagic = 1,
182 183 banner = 1,
@@ -225,7 +226,6 b" object? -> Details about 'object'. ?object also works, ?? prints more."
225 226 xmode = 'Verbose',
226 227 wildcards_case_sensitive = 1,
227 228 magic_docstrings = 0, # undocumented, for doc generation
228 autoedit_syntax = 0,
229 229 )
230 230
231 231 # Things that will *only* appear in rcfiles (not at the command line).
@@ -1,5 +1,16 b''
1 1 2005-12-28 Fernando Perez <Fernando.Perez@colorado.edu>
2 2
3 * IPython/iplib.py (handle_shell_escape): add Ville's patch to
4 better hadnle backslashes in paths. See the thread 'More Windows
5 questions part 2 - \/ characters revisited' on the iypthon user
6 list:
7 http://scipy.net/pipermail/ipython-user/2005-June/000907.html
8
9 * IPython/ipmaker.py (make_IPython): make the autoedit_syntax flag
10 true by default, and add it to the shipped ipythonrc file. Since
11 this asks the user before proceeding, I think it's OK to make it
12 true by default.
13
3 14 * IPython/Magic.py (magic_exit): make new exit/quit magics instead
4 15 of the previous special-casing of input in the eval loop. I think
5 16 this is cleaner, as they really are commands and shouldn't have
General Comments 0
You need to be logged in to leave comments. Login now