##// END OF EJS Templates
ipipe patch 5 from Walter Doerwald, featuring:...
ipipe patch 5 from Walter Doerwald, featuring: Change the way padding is done in ibrowse: Instead of creating a string long enough to fill the rest of the colum even if this column is much to long for the screen, only create a pad string large enough for the visible part. This speeds up scrolling with very long columns. Implement a workaround for eval() not accepting non-dicts as namespaces. (Patch contributed by Torsten Marek) xiter() now directly supports dictproxies, so e.g. "int.__dict__ | ibrowse" works. xrepr() has been rewritten as a generator (and all __xrepr__() methods too): This has two advantages: 1) xrepr() of large datastructure are usable now, because the generator is abandoned after "enough" output has been generated (defaults to 200 characters). 2) xrepr() methods can now return styles for each part of their output. xrepr() is used everywhere now: in the header and footer (like before) but also in the table cells. For this two new xrepr() modes habe been added: "cell" for an object in a ibrowse table cell and "default" which must be used as the mode in recursive calls to xrepr() (this returns a representation that has the most similarity to a normal repr()). Removed the special treatment of lists and tuples in xattrs(). If you want to see the list or tuple simply enter it. This is again done to keep ibrowse useable even with large data structures. Add a class List as a replacement for the old functionality (icsv needs this).

File last commit:

r164:c66a3f62
r225:a1ae16ad
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