Show More
@@ -1,7 +1,7 b'' | |||
|
1 | 1 | # -*- coding: utf-8 -*- |
|
2 | 2 | """Magic functions for InteractiveShell. |
|
3 | 3 | |
|
4 |
$Id: Magic.py 21 |
|
|
4 | $Id: Magic.py 2122 2007-03-01 02:27:11Z fperez $""" | |
|
5 | 5 | |
|
6 | 6 | #***************************************************************************** |
|
7 | 7 | # Copyright (C) 2001 Janko Hauser <jhauser@zscout.de> and |
@@ -210,6 +210,7 b' license. To use profiling, please install"python2.3-profiler" from non-free.""")' | |||
|
210 | 210 | except KeyError: |
|
211 | 211 | continue |
|
212 | 212 | else: |
|
213 | #print 'oname_rest:', oname_rest # dbg | |
|
213 | 214 | for part in oname_rest: |
|
214 | 215 | try: |
|
215 | 216 | parent = obj |
@@ -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 2 |
|
|
9 | $Id: iplib.py 2122 2007-03-01 02:27:11Z fperez $ | |
|
10 | 10 | """ |
|
11 | 11 | |
|
12 | 12 | #***************************************************************************** |
@@ -492,6 +492,15 b' class InteractiveShell(object,Magic):' | |||
|
492 | 492 | r'([\?\w\.]+\w*\s*)' |
|
493 | 493 | r'(\(?.*$)') |
|
494 | 494 | |
|
495 | # A simpler regexp used as a fallback if the above doesn't work. This | |
|
496 | # one is more conservative in how it partitions the input. This code | |
|
497 | # can probably be cleaned up to do everything with just one regexp, but | |
|
498 | # I'm afraid of breaking something; do it once the unit tests are in | |
|
499 | # place. | |
|
500 | self.line_split_fallback = re.compile(r'^(\s*)' | |
|
501 | r'([\w\.]*)' | |
|
502 | r'(.*)') | |
|
503 | ||
|
495 | 504 | # Original re, keep around for a while in case changes break something |
|
496 | 505 | #self.line_split = re.compile(r'(^[\s*!\?%,/]?)' |
|
497 | 506 | # r'(\s*[\?\w\.]+\w*\s*)' |
@@ -2017,17 +2026,14 b' want to merge them back into the new files.""" % locals()' | |||
|
2017 | 2026 | |
|
2018 | 2027 | lsplit = self.line_split.match(line) |
|
2019 | 2028 | if lsplit is None: # no regexp match returns None |
|
2020 | try: | |
|
2021 | iFun,theRest = line.split(None,1) | |
|
2022 | except ValueError: | |
|
2023 | iFun,theRest = line,'' | |
|
2024 | pre = re.match('^(\s*)(.*)',line).groups()[0] | |
|
2025 | else: | |
|
2026 | pre,iFun,theRest = lsplit.groups() | |
|
2029 | lsplit = self.line_split_fallback.match(line) | |
|
2027 | 2030 | |
|
2031 | #pre,iFun,theRest = lsplit.groups() # dbg | |
|
2028 | 2032 | #print 'line:<%s>' % line # dbg |
|
2029 | 2033 | #print 'pre <%s> iFun <%s> rest <%s>' % (pre,iFun.strip(),theRest) # dbg |
|
2030 | return pre,iFun.strip(),theRest | |
|
2034 | #return pre,iFun.strip(),theRest # dbg | |
|
2035 | ||
|
2036 | return lsplit.groups() | |
|
2031 | 2037 | |
|
2032 | 2038 | def _prefilter(self, line, continue_prompt): |
|
2033 | 2039 | """Calls different preprocessors, depending on the form of line.""" |
@@ -1,3 +1,9 b'' | |||
|
1 | 2007-02-28 Fernando Perez <Fernando.Perez@colorado.edu> | |
|
2 | ||
|
3 | * IPython/iplib.py (split_user_input): fix input splitting so we | |
|
4 | don't attempt attribute accesses on things that can't possibly be | |
|
5 | valid Python attributes. After a bug report by Alex Schmolck. | |
|
6 | ||
|
1 | 7 | 2007-02-27 Fernando Perez <Fernando.Perez@colorado.edu> |
|
2 | 8 | |
|
3 | 9 | * IPython/Shell.py (IPShellGTK.mainloop): update threads calls to |
General Comments 0
You need to be logged in to leave comments.
Login now