From f377dcb34bd2642e82d87cb21ba0723025aee9e0 2006-01-13 22:47:06 From: vivainio Date: 2006-01-13 22:47:06 Subject: [PATCH] Fixed logical flaw (harmless so far) in handle_shell_escape --- diff --git a/IPython/iplib.py b/IPython/iplib.py index 50b8d89..3f71534 100644 --- a/IPython/iplib.py +++ b/IPython/iplib.py @@ -6,7 +6,7 @@ Requires Python 2.1 or newer. This file contains all the classes and helper functions specific to IPython. -$Id: iplib.py 1013 2006-01-13 08:33:32Z fperez $ +$Id: iplib.py 1015 2006-01-13 22:47:06Z vivainio $ """ #***************************************************************************** @@ -1867,6 +1867,7 @@ want to merge them back into the new files.""" % locals() if iFun in self.alias_table: return self.handle_alias(line,continue_prompt, pre,iFun,theRest) + else: return self.handle_normal(line,continue_prompt) @@ -1938,10 +1939,11 @@ want to merge them back into the new files.""" % locals() # correctly theRest = '%s %s' % (iFun[2:],theRest) iFun = 'sx' - return self.handle_magic('%ssx %s' % (self.ESC_MAGIC,line[2:]), + return self.handle_magic('%ssx %s' % (self.ESC_MAGIC, + line.lstrip()[2:]), continue_prompt,pre,iFun,theRest) else: - cmd=line.lstrip()[1:] + cmd=line.lstrip().lstrip('!') line_out = '%sipsystem(%s)' % (pre,make_quoted_expr(cmd)) # update cache/log and return self.log(line_out,continue_prompt) diff --git a/doc/ChangeLog b/doc/ChangeLog index 01e05d2..56a7de7 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -4,8 +4,14 @@ so far only set_term_title is implemented (change terminal label in windowing systems). %cd now changes the title to current dir. - - * Added myself to "authors" list, had to create new files. + + * IPython/Release.py: Added myself to "authors" list, + had to create new files. + + * IPython/iplib.py (handle_shell_escape): fixed logical flaw in + shell escape; not a known bug but had potential to be one in the + future. + 2006-01-13 Fernando Perez