How to create a scrollable screen in text mode with Python

后端 未结 3 713
清酒与你
清酒与你 2021-01-03 02:19

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 eas

3条回答
  •  离开以前
    2021-01-03 02:46

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

提交回复
热议问题