File tree 1 file changed +10
-1
lines changed
1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -636,7 +636,16 @@ def sigint(*args):
636
636
# before starting it).
637
637
def run_with_screen_before_mainloop ():
638
638
try :
639
- # XXX no stdin for you! What to do here?
639
+ # Currently we just set this to None because I do not
640
+ # expect code hitting stdin to work. For example: exit()
641
+ # (not sys.exit, site.py's exit) tries to close sys.stdin,
642
+ # which breaks urwid's shutdown. bpython.cli sets this to
643
+ # a fake object that reads input through curses and
644
+ # returns it. When using twisted I do not think we can do
645
+ # that because sys.stdin.read and friends block, and we
646
+ # cannot re-enter the reactor. If using urwid's own
647
+ # mainloop we *might* be able to do something similar and
648
+ # re-enter its mainloop.
640
649
sys .stdin = None #FakeStdin(myrepl)
641
650
sys .stdout = myrepl
642
651
sys .stderr = myrepl
You can’t perform that action at this time.
0 commit comments