Show More
@@ -6,7 +6,7 b' Requires Python 2.3 or newer.' | |||||
6 |
|
6 | |||
7 | This file contains all the classes and helper functions specific to IPython. |
|
7 | This file contains all the classes and helper functions specific to IPython. | |
8 |
|
8 | |||
9 |
$Id: iplib.py 109 |
|
9 | $Id: iplib.py 1093 2006-01-28 00:18:49Z vivainio $ | |
10 | """ |
|
10 | """ | |
11 |
|
11 | |||
12 | #***************************************************************************** |
|
12 | #***************************************************************************** | |
@@ -1935,7 +1935,8 b' want to merge them back into the new files.""" % locals()' | |||||
1935 | and |
|
1935 | and | |
1936 | ( |
|
1936 | ( | |
1937 | #only consider exclusion re if not "," or ";" autoquoting |
|
1937 | #only consider exclusion re if not "," or ";" autoquoting | |
1938 |
(pre == self.ESC_QUOTE or pre == self.ESC_QUOTE2 |
|
1938 | (pre == self.ESC_QUOTE or pre == self.ESC_QUOTE2 | |
|
1939 | or pre == self.ESC_PAREN) or | |||
1939 | (not self.re_exclude_auto.match(theRest))) |
|
1940 | (not self.re_exclude_auto.match(theRest))) | |
1940 | and |
|
1941 | and | |
1941 | self.re_fun_name.match(iFun) and |
|
1942 | self.re_fun_name.match(iFun) and | |
@@ -2029,12 +2030,15 b' want to merge them back into the new files.""" % locals()' | |||||
2029 | return line |
|
2030 | return line | |
2030 |
|
2031 | |||
2031 | auto_rewrite = True |
|
2032 | auto_rewrite = True | |
|
2033 | ||||
2032 | if pre == self.ESC_QUOTE: |
|
2034 | if pre == self.ESC_QUOTE: | |
2033 | # Auto-quote splitting on whitespace |
|
2035 | # Auto-quote splitting on whitespace | |
2034 | newcmd = '%s("%s")' % (iFun,'", "'.join(theRest.split()) ) |
|
2036 | newcmd = '%s("%s")' % (iFun,'", "'.join(theRest.split()) ) | |
2035 | elif pre == self.ESC_QUOTE2: |
|
2037 | elif pre == self.ESC_QUOTE2: | |
2036 | # Auto-quote whole string |
|
2038 | # Auto-quote whole string | |
2037 | newcmd = '%s("%s")' % (iFun,theRest) |
|
2039 | newcmd = '%s("%s")' % (iFun,theRest) | |
|
2040 | elif pre == self.ESC_PAREN: | |||
|
2041 | newcmd = '%s(%s)' % (iFun,",".join(theRest.split())) | |||
2038 | else: |
|
2042 | else: | |
2039 | # Auto-paren. |
|
2043 | # Auto-paren. | |
2040 | # We only apply it to argument-less calls if the autocall |
|
2044 | # We only apply it to argument-less calls if the autocall | |
@@ -2053,11 +2057,11 b' want to merge them back into the new files.""" % locals()' | |||||
2053 | else: |
|
2057 | else: | |
2054 | # if the object doesn't support [] access, go ahead and |
|
2058 | # if the object doesn't support [] access, go ahead and | |
2055 | # autocall |
|
2059 | # autocall | |
2056 | newcmd = '%s(%s)' % (iFun.rstrip(),theRest) |
|
2060 | newcmd = '%s(%s)' % (iFun.rstrip(),",".join(theRest.split())) | |
2057 | elif theRest.endswith(';'): |
|
2061 | elif theRest.endswith(';'): | |
2058 | newcmd = '%s(%s);' % (iFun.rstrip(),theRest[:-1]) |
|
2062 | newcmd = '%s(%s);' % (iFun.rstrip(),theRest[:-1]) | |
2059 | else: |
|
2063 | else: | |
2060 | newcmd = '%s(%s)' % (iFun.rstrip(),theRest) |
|
2064 | newcmd = '%s(%s)' % (iFun.rstrip(),",".join(theRest.split())) | |
2061 |
|
2065 | |||
2062 | if auto_rewrite: |
|
2066 | if auto_rewrite: | |
2063 | print >>Term.cout, self.outputcache.prompt1.auto_rewrite() + newcmd |
|
2067 | print >>Term.cout, self.outputcache.prompt1.auto_rewrite() + newcmd |
@@ -25,6 +25,8 b'' | |||||
25 | * ipmaker.py: now import ipy_profile_PROFILENAME automatically |
|
25 | * ipmaker.py: now import ipy_profile_PROFILENAME automatically | |
26 |
|
26 | |||
27 | * usage.py, Magic.py: added %quickref |
|
27 | * usage.py, Magic.py: added %quickref | |
|
28 | ||||
|
29 | * iplib.py: ESC_PAREN fixes: /f 1 2 -> f(1,2), not f(1 2). | |||
28 |
|
30 | |||
29 | 2006-01-25 Fernando Perez <Fernando.Perez@colorado.edu> |
|
31 | 2006-01-25 Fernando Perez <Fernando.Perez@colorado.edu> | |
30 |
|
32 |
General Comments 0
You need to be logged in to leave comments.
Login now