tags:

views:

85

answers:

2

I would like to create a scrollable screen in text mode, like the one obtained when typing help(object) in the interpreter. Is there a cross-platform module I can use to easily implement this?

For example:

>>> def jhelp(object):
>>>     text = # get text for object
>>>     display_text(text) # display a scrollable screen. How do I do this?
>>>
>>> l = [1,2,3]
>>> jhelp(l)
A: 

look at pydoc module in the standard library

mg
+2  A: 
from pydoc import ttypager

def jhelp(object):
     text = # get text for object
     ttypager(text) # display a scrollable screen.
pwdyson