[IPython-dev] Column format
Hans Meine
hans_meine at gmx.net
Tue Apr 5 03:25:53 EDT 2011
Am Montag, 4. April 2011, um 22:58:35 schrieb Robert Kern:
> On 4/4/11 12:04 PM, Hugo Gagnon wrote:
> > Hello,
> >
> > Is there a function in the ipython API that takes in a list of strings
> > to output and returns a nicely formatted list of lines depending on the
> > terminal's width? If so where is it located so I'll probably need to
> > modify it since I don't really have a terminal as is but rather a GUI
> > application...
>
> https://bitbucket.org/robertkern/kernmagic/src/tip/kernmagic/utils.py#cl-92
Is there a good reason for this:
isinstance(strings[i], str)
I would have expected sth. more like:
isinstance(strings[i], basestring)
(which would lead to unicode being returned if the input contained unicode
strings).
Nice util function otherwise,
Hans
More information about the IPython-dev
mailing list