##// END OF EJS Templates
Walter's ipipe patch #8:...
Walter's ipipe patch #8: Strip whitespace from docstrings in the detail view. Add a goto command to the browser: Pressing "g" gives a prompt on the last line of the screen where a row number can be entered. Pressing RETURN jumps to that row. Fix _BrowserHelp.__xrepr__(). Fix display of attribute in the footer.

File last commit:

r164:c66a3f62
r238:d1a8a87b
Show More
rlineimpl.py
48 lines | 1.5 KiB | text/x-python | PythonLexer
# -*- coding: utf-8 -*-
""" Imports and provides the "correct" version of readline for the platform.
Readline is used throughout IPython as "import IPython.rlineimpl as readline.
In addition to normal readline stuff, this module provides have_readline boolean
and _outputfile variable used in genutils.
$Id: Magic.py 1096 2006-01-28 20:08:02Z vivainio $"""
import sys
have_readline = False
if sys.platform == 'win32':
try:
from pyreadline import *
print "Using the new pyreadline (thanks for participating in the testing!)"
have_readline = True
import pyreadline as _rl
except ImportError:
print "IPython team recommends the new pyreadline for Windows use, it wasn't found."
print "It's superior especially with non-US keyboard layouts."
print "Try installing it with 'easy_install pyreadline (ctypes is required) or"
print "svn co http://ipython.scipy.org/svn/ipython/pyreadline/trunk pyreadline"
print "Trying 'old' windows readline."
try:
from readline import *
import readline as _rl
have_readline = True
except ImportError:
pass
if have_readline:
try:
_outputfile=_rl.GetOutputFile()
except NameError:
print "Failed GetOutputFile"
have_readline = False
else:
try:
from readline import *
have_readline = True
except ImportError:
pass