Show More
@@ -5,7 +5,7 b' General purpose utilities.' | |||
|
5 | 5 | This is a grab-bag of stuff I find useful in most programs I write. Some of |
|
6 | 6 | these things are also convenient when working at the command line. |
|
7 | 7 | |
|
8 |
$Id: genutils.py 1 |
|
|
8 | $Id: genutils.py 1100 2006-01-29 21:27:16Z vivainio $""" | |
|
9 | 9 | |
|
10 | 10 | #***************************************************************************** |
|
11 | 11 | # Copyright (C) 2001-2006 Fernando Perez. <fperez@colorado.edu> |
@@ -149,7 +149,7 b' Term = IOTerm()' | |||
|
149 | 149 | |
|
150 | 150 | import IPython.rlineimpl as readline |
|
151 | 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 | 154 | Term = IOTerm(cout=readline._outputfile,cerr=readline._outputfile) |
|
155 | 155 |
@@ -25,19 +25,21 b" if sys.platform == 'win32':" | |||
|
25 | 25 | print "svn co http://ipython.scipy.org/svn/ipython/pyreadline/trunk pyreadline" |
|
26 | 26 | print "Trying 'old' windows readline." |
|
27 | 27 | |
|
28 | from readline import * | |
|
29 | have_readline = True | |
|
28 | try: | |
|
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 | 40 | else: |
|
31 | 41 | try: |
|
32 | 42 | from readline import * |
|
33 | 43 | have_readline = True |
|
34 | 44 | except ImportError: |
|
35 | 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