[#21682] help() doesn't work in the console
replace pydoc's pager function so the console's input isnt used.
This commit is contained in:
parent
49493dec55
commit
247b7249bd
@ -50,6 +50,13 @@ def _main():
|
|||||||
if not app.debug:
|
if not app.debug:
|
||||||
_sys.stdin = None
|
_sys.stdin = None
|
||||||
|
|
||||||
|
# because of how the console works. we need our own help() pager func.
|
||||||
|
# replace the bold function because it adds crazy chars
|
||||||
|
import pydoc
|
||||||
|
pydoc.getpager = lambda: pydoc.plainpager
|
||||||
|
pydoc.TextDoc.bold = lambda self, text: text
|
||||||
|
|
||||||
|
|
||||||
# if "-d" in sys.argv: # Enable this to measure startup speed
|
# if "-d" in sys.argv: # Enable this to measure startup speed
|
||||||
if 0:
|
if 0:
|
||||||
import cProfile
|
import cProfile
|
||||||
|
Loading…
x
Reference in New Issue
Block a user