##// END OF EJS Templates
- More unicode fixes, properly split user input without generating...
fperez -
Show More
@@ -6,7 +6,7 b' Requires Python 2.3 or newer.'
6
6
7 This file contains all the classes and helper functions specific to IPython.
7 This file contains all the classes and helper functions specific to IPython.
8
8
9 $Id: iplib.py 2190 2007-03-30 18:35:46Z fperez $
9 $Id: iplib.py 2195 2007-04-02 05:35:16Z fperez $
10 """
10 """
11
11
12 #*****************************************************************************
12 #*****************************************************************************
@@ -2045,6 +2045,14 b' want to merge them back into the new files.""" % locals()'
2045 else:
2045 else:
2046 pre,iFun,theRest = lsplit.groups()
2046 pre,iFun,theRest = lsplit.groups()
2047
2047
2048 # iFun has to be a valid python identifier, so it better be only pure
2049 #ascii, no unicode:
2050 try:
2051 iFun = iFun.encode('ascii')
2052 except UnicodeEncodeError:
2053 theRest = iFun+u' '+theRest
2054 iFun = u''
2055
2048 #print 'line:<%s>' % line # dbg
2056 #print 'line:<%s>' % line # dbg
2049 #print 'pre <%s> iFun <%s> rest <%s>' % (pre,iFun.strip(),theRest) # dbg
2057 #print 'pre <%s> iFun <%s> rest <%s>' % (pre,iFun.strip(),theRest) # dbg
2050 return pre,iFun.strip(),theRest
2058 return pre,iFun.strip(),theRest
@@ -1,5 +1,10 b''
1 2007-04-01 Fernando Perez <Fernando.Perez@colorado.edu>
1 2007-04-01 Fernando Perez <Fernando.Perez@colorado.edu>
2
2
3 * IPython/iplib.py (split_user_input): ensure that when splitting
4 user input, the part that can be treated as a python name is pure
5 ascii (Python identifiers MUST be pure ascii). Part of the
6 ongoing Unicode support work.
7
3 * IPython/Prompts.py (prompt_specials_color): Add \N for the
8 * IPython/Prompts.py (prompt_specials_color): Add \N for the
4 actual prompt number, without any coloring. This allows users to
9 actual prompt number, without any coloring. This allows users to
5 produce numbered prompts with their own colors. Added after a
10 produce numbered prompts with their own colors. Added after a
General Comments 0
You need to be logged in to leave comments. Login now