##// END OF EJS Templates
add sys.setdefaultencoding() call after a patch by 'pan'. ChangeLogs
vivainio -
Show More
@@ -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 2885 2007-12-07 10:59:06Z vivainio $
9 $Id: iplib.py 2889 2007-12-12 19:32:33Z vivainio $
10 10 """
11 11
12 12 #*****************************************************************************
@@ -79,6 +79,16 b' import IPython.prefilter as prefilter'
79 79 import IPython.shadowns
80 80 # Globals
81 81
82 # make converting between str and unicode easy, so str() will work most of the
83 # time
84
85 try:
86 sys.setappdefaultencoding(sys.stdin.encoding or 'ascii')
87 except:
88 # Many python versions don't have sys.setappdefaultencoding
89 reload(sys)
90 sys.setdefaultencoding(sys.stdin.encoding or 'ascii')
91
82 92 # store the builtin raw_input globally, and use this always, in case user code
83 93 # overwrites it (like wx.py.PyShell does)
84 94 raw_input_original = raw_input
@@ -1911,7 +1921,7 b' want to merge them back into the new files.""" % locals()'
1911 1921 # this allows execution of indented pasted code. It is tempting
1912 1922 # to add '\n' at the end of source to run commands like ' a=1'
1913 1923 # directly, but this fails for more complicated scenarios
1914 source=source.encode(self.stdin_encoding)
1924 source = str(source)
1915 1925 if source[:1] in [' ', '\t']:
1916 1926 source = 'if 1:\n%s' % source
1917 1927
@@ -1,3 +1,13 b''
1 2007-12-12 Ville Vainio <vivainio@gmail.com>
2
3 * genutils.py (abbrev_cwd): Terminal title now shows 2 levels of current
4 directory.
5
6 * iplib.py: We now set system default encoding to sys.stdin.encoding with
7 sys.setdefaultencoding, after a patch by 'pan'. This makes str() calls that
8 IPython still has implicitly work. This should be removed when such calls
9 are cleaned.
10
1 11 2007-12-12 Fernando Perez <Fernando.Perez@colorado.edu>
2 12
3 13 * IPython/Shell.py (_select_shell): add support for controlling
@@ -5,6 +15,19 b''
5 15 having to modify MPL config files. Added unit tests for this
6 16 feature, though manual/docs update is still pending, will do later.
7 17
18 2007-12-11 Ville Vainio <vivainio@gmail.com>
19
20 * ext_rescapture.py: var = !cmd is no longer verbose (to facilitate
21 use in scripts)
22
23 2007-12-07 Ville Vainio <vivainio@gmail.com>
24
25 * iplib.py, ipy_profile_sh.py: Do not escape # on command lines
26 anymore (to \#) - even if it is a comment char that is implicitly
27 escaped in some unix shells in interactive mode, it is ok to leave
28 it in IPython as such.
29
30
8 31 2007-12-01 Robert Kern <robert.kern@gmail.com>
9 32
10 33 * IPython/ultraTB.py (findsource): Improve the monkeypatch to
@@ -39,6 +62,7 b''
39 62 readline_omit__names setting.
40 63
41 64 2007-11-08 Ville Vainio <vivainio@gmail.com>
65
42 66 * ipy_completers.py (import completer): assume 'xml' module exists.
43 67 Do not add every module twice anymore. Closes #196.
44 68
General Comments 0
You need to be logged in to leave comments. Login now