Show More
@@ -6,7 +6,7 b' Requires Python 2.3 or newer.' | |||
|
6 | 6 | |
|
7 | 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 | 1935 | and |
|
1936 | 1936 | ( |
|
1937 | 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 | 1940 | (not self.re_exclude_auto.match(theRest))) |
|
1940 | 1941 | and |
|
1941 | 1942 | self.re_fun_name.match(iFun) and |
@@ -2029,12 +2030,15 b' want to merge them back into the new files.""" % locals()' | |||
|
2029 | 2030 | return line |
|
2030 | 2031 | |
|
2031 | 2032 | auto_rewrite = True |
|
2033 | ||
|
2032 | 2034 | if pre == self.ESC_QUOTE: |
|
2033 | 2035 | # Auto-quote splitting on whitespace |
|
2034 | 2036 | newcmd = '%s("%s")' % (iFun,'", "'.join(theRest.split()) ) |
|
2035 | 2037 | elif pre == self.ESC_QUOTE2: |
|
2036 | 2038 | # Auto-quote whole string |
|
2037 | 2039 | newcmd = '%s("%s")' % (iFun,theRest) |
|
2040 | elif pre == self.ESC_PAREN: | |
|
2041 | newcmd = '%s(%s)' % (iFun,",".join(theRest.split())) | |
|
2038 | 2042 | else: |
|
2039 | 2043 | # Auto-paren. |
|
2040 | 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 | 2057 | else: |
|
2054 | 2058 | # if the object doesn't support [] access, go ahead and |
|
2055 | 2059 | # autocall |
|
2056 | newcmd = '%s(%s)' % (iFun.rstrip(),theRest) | |
|
2060 | newcmd = '%s(%s)' % (iFun.rstrip(),",".join(theRest.split())) | |
|
2057 | 2061 | elif theRest.endswith(';'): |
|
2058 | 2062 | newcmd = '%s(%s);' % (iFun.rstrip(),theRest[:-1]) |
|
2059 | 2063 | else: |
|
2060 | newcmd = '%s(%s)' % (iFun.rstrip(),theRest) | |
|
2064 | newcmd = '%s(%s)' % (iFun.rstrip(),",".join(theRest.split())) | |
|
2061 | 2065 | |
|
2062 | 2066 | if auto_rewrite: |
|
2063 | 2067 | print >>Term.cout, self.outputcache.prompt1.auto_rewrite() + newcmd |
General Comments 0
You need to be logged in to leave comments.
Login now