From 310208b5071116de4d742c992546742c3d582607 2007-03-01 06:54:44 From: fperez Date: 2007-03-01 06:54:44 Subject: [PATCH] Fix regexp that inadvertedly broke magics with explicit % prefix. --- diff --git a/IPython/iplib.py b/IPython/iplib.py index 0d0949f..a62fe44 100644 --- a/IPython/iplib.py +++ b/IPython/iplib.py @@ -6,7 +6,7 @@ Requires Python 2.3 or newer. This file contains all the classes and helper functions specific to IPython. -$Id: iplib.py 2122 2007-03-01 02:27:11Z fperez $ +$Id: iplib.py 2123 2007-03-01 06:54:44Z fperez $ """ #***************************************************************************** @@ -498,7 +498,7 @@ class InteractiveShell(object,Magic): # I'm afraid of breaking something; do it once the unit tests are in # place. self.line_split_fallback = re.compile(r'^(\s*)' - r'([\w\.]*)' + r'([%\w\.]*)' r'(.*)') # Original re, keep around for a while in case changes break something diff --git a/doc/ChangeLog b/doc/ChangeLog index b1a729b..164f37f 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -3,6 +3,8 @@ * IPython/iplib.py (split_user_input): fix input splitting so we don't attempt attribute accesses on things that can't possibly be valid Python attributes. After a bug report by Alex Schmolck. + (InteractiveShell.__init__): brown-paper bag fix; regexp broke + %magic with explicit % prefix. 2007-02-27 Fernando Perez