Prevent help() from blocking terminal
Ensures that the pydoc pager gets re-directed to the PyShell. Also keeps a copy of stdin to prevent closure in case of re-assignment Fixes https://gitlab.com/kicad/code/kicad/issues/8047
This commit is contained in:
parent
22bdf37fc2
commit
435b1720c3
|
@ -108,6 +108,12 @@ class PcbnewPyShell(editor.EditorNotebookFrame):
|
||||||
self.setEditor(self.crust.editor)
|
self.setEditor(self.crust.editor)
|
||||||
self.crust.editor.SetFocus()
|
self.crust.editor.SetFocus()
|
||||||
|
|
||||||
|
"""Keep pydoc output on stdout instead of pager and
|
||||||
|
place the stdout into the editor window """
|
||||||
|
import pydoc, sys
|
||||||
|
self._keep_stdin = sys.stdin
|
||||||
|
pydoc.pager = pydoc.plainpager
|
||||||
|
|
||||||
self.LoadHistory()
|
self.LoadHistory()
|
||||||
|
|
||||||
def OnAbout(self, event):
|
def OnAbout(self, event):
|
||||||
|
|
Loading…
Reference in New Issue