Show More
@@ -5,7 +5,7 b' 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 1 |
|
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 b' 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 b" 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 * |
|
|||
29 | have_readline = True |
|
|||
30 | else: |
|
|||
31 | try: |
|
28 | try: | |
32 | from readline import * |
|
29 | from readline import * | |
33 | have_readline = True |
|
30 | have_readline = True | |
34 | except ImportError: |
|
31 | except ImportError: | |
35 | pass |
|
32 | pass | |
36 |
|
33 | |||
37 |
|
||||
38 | if have_readline: |
|
34 | if have_readline: | |
39 | try: |
|
35 | try: | |
40 | _outputfile=GetOutputFile() |
|
36 | _outputfile=GetOutputFile() | |
41 |
except |
|
37 | except NameError: | |
42 | have_readline = False |
|
38 | have_readline = False | |
43 |
|
39 | |||
|
40 | else: | |||
|
41 | try: | |||
|
42 | from readline import * | |||
|
43 | have_readline = True | |||
|
44 | except ImportError: | |||
|
45 | pass |
General Comments 0
You need to be logged in to leave comments.
Login now