##// END OF EJS Templates
Oops, OutputFile was only in Windows readline, fixed.
vivainio -
r162:f390119e
parent child
Show More
@@ -5,7 +5,7 General purpose utilities.
5 This is a grab-bag of stuff I find useful in most programs I write. Some of
5 This is a grab-bag of stuff I find useful in most programs I write. Some of
6 these things are also convenient when working at the command line.
6 these things are also convenient when working at the command line.
7
7
8 $Id: genutils.py 1099 2006-01-29 21:05:57Z vivainio $"""
8 $Id: genutils.py 1100 2006-01-29 21:27:16Z vivainio $"""
9
9
10 #*****************************************************************************
10 #*****************************************************************************
11 # Copyright (C) 2001-2006 Fernando Perez. <fperez@colorado.edu>
11 # Copyright (C) 2001-2006 Fernando Perez. <fperez@colorado.edu>
@@ -149,7 +149,7 Term = IOTerm()
149
149
150 import IPython.rlineimpl as readline
150 import IPython.rlineimpl as readline
151 # Remake Term to use the readline i/o facilities
151 # Remake Term to use the readline i/o facilities
152 if readline.have_readline:
152 if sys.platform == 'win32' and readline.have_readline:
153
153
154 Term = IOTerm(cout=readline._outputfile,cerr=readline._outputfile)
154 Term = IOTerm(cout=readline._outputfile,cerr=readline._outputfile)
155
155
@@ -25,19 +25,21 if sys.platform == 'win32':
25 print "svn co http://ipython.scipy.org/svn/ipython/pyreadline/trunk pyreadline"
25 print "svn co http://ipython.scipy.org/svn/ipython/pyreadline/trunk pyreadline"
26 print "Trying 'old' windows readline."
26 print "Trying 'old' windows readline."
27
27
28 from readline import *
28 try:
29 have_readline = True
29 from readline import *
30 have_readline = True
31 except ImportError:
32 pass
33
34 if have_readline:
35 try:
36 _outputfile=GetOutputFile()
37 except NameError:
38 have_readline = False
39
30 else:
40 else:
31 try:
41 try:
32 from readline import *
42 from readline import *
33 have_readline = True
43 have_readline = True
34 except ImportError:
44 except ImportError:
35 pass
45 pass
36
37
38 if have_readline:
39 try:
40 _outputfile=GetOutputFile()
41 except AttributeError:
42 have_readline = False
43
General Comments 0
You need to be logged in to leave comments. Login now