##// END OF EJS Templates
fix handling of aliases/system calls for multiline input
fperez -
Show More
@@ -1,7 +1,7 b''
1 1 # -*- coding: utf-8 -*-
2 2 """Release data for the IPython project.
3 3
4 $Id: Release.py 981 2005-12-30 15:43:43Z fperez $"""
4 $Id: Release.py 982 2005-12-30 23:57:07Z fperez $"""
5 5
6 6 #*****************************************************************************
7 7 # Copyright (C) 2001-2005 Fernando Perez <fperez@colorado.edu>
@@ -22,9 +22,9 b" name = 'ipython'"
22 22 # because bdist_rpm does not accept dashes (an RPM) convention, and
23 23 # bdist_deb does not accept underscores (a Debian convention).
24 24
25 version = '0.7.0.rc2'
25 version = '0.7.0.rc3'
26 26
27 revision = '$Revision: 981 $'
27 revision = '$Revision: 982 $'
28 28
29 29 description = "An enhanced interactive Python shell."
30 30
@@ -6,7 +6,7 b' Requires Python 2.1 or newer.'
6 6
7 7 This file contains all the classes and helper functions specific to IPython.
8 8
9 $Id: iplib.py 978 2005-12-30 02:37:15Z fperez $
9 $Id: iplib.py 982 2005-12-30 23:57:07Z fperez $
10 10 """
11 11
12 12 #*****************************************************************************
@@ -1598,6 +1598,8 b' want to merge them back into the new files.""" % locals()'
1598 1598 # interactive loop, since that one is only seen by keyboard input. We
1599 1599 # need this done correctly even for code run via runlines (which uses
1600 1600 # push).
1601
1602 print 'push line: <%s>' % line # dbg
1601 1603 self.autoindent_update(line)
1602 1604
1603 1605 self.buffer.append(line)
@@ -1812,7 +1814,9 b' want to merge them back into the new files.""" % locals()'
1812 1814 pre=None,iFun=None,theRest=None):
1813 1815 """Handle alias input lines. """
1814 1816
1815 line_out = 'ipalias("%s %s")' % (iFun,esc_quotes(theRest))
1817 # pre is needed, because it carries the leading whitespace. Otherwise
1818 # aliases won't work in indented sections.
1819 line_out = '%sipalias("%s %s")' % (pre,iFun,esc_quotes(theRest))
1816 1820 self.log(line_out,continue_prompt)
1817 1821 return line_out
1818 1822
@@ -1828,7 +1832,7 b' want to merge them back into the new files.""" % locals()'
1828 1832 return pre
1829 1833 else:
1830 1834 cmd = ("%s %s" % (iFun[1:],theRest))
1831 line_out = 'ipsystem(r"""%s"""[:-1])' % (cmd + "_")
1835 line_out = '%sipsystem(r"""%s"""[:-1])' % (pre,cmd + "_")
1832 1836 else: # single-line input
1833 1837 if line.startswith('!!'):
1834 1838 # rewrite iFun/theRest to properly hold the call to %sx and
@@ -1840,7 +1844,7 b' want to merge them back into the new files.""" % locals()'
1840 1844 continue_prompt,pre,iFun,theRest)
1841 1845 else:
1842 1846 cmd=line[1:]
1843 line_out = 'ipsystem(r"""%s"""[:-1])' % (cmd +"_")
1847 line_out = '%sipsystem(r"""%s"""[:-1])' % (pre,cmd +"_")
1844 1848 # update cache/log and return
1845 1849 self.log(line_out,continue_prompt)
1846 1850 return line_out
@@ -1,5 +1,9 b''
1 1 2005-12-30 Fernando Perez <Fernando.Perez@colorado.edu>
2 2
3 * IPython/iplib.py (handle_shell_escape): fix bug where both
4 aliases and system accesses where broken for indented code (such
5 as loops).
6
3 7 * IPython/genutils.py (shell): fix small but critical bug for
4 8 win32 system access.
5 9
@@ -106,6 +106,19 b' Things that should be done for the current series, before starting major'
106 106 Fix any bugs reported at the online bug tracker.
107 107 \layout Itemize
108 108
109 History bug: I often see that, under certain circumstances, the input history
110 is incorrect.
111 The problem is that so far, I've failed to find a simple way to reproduce
112 it consistently, so I can't easily track it down.
113 It seems to me that it happens when output is generated multiple times
114 for the same input (for i in range(10): i will do it).
115 But even this isn't reliable...
116 Ultimately the right solution for this is to cleanly separate the dataflow
117 for input/output history management; right now that happens all over the
118 place, which makes the code impossible to debug, and almost guaranteed
119 to be buggy in the first place.
120 \layout Itemize
121
109 122
110 123 \series bold
111 124 Redesign the output traps.
General Comments 0
You need to be logged in to leave comments. Login now