mdrubin / pythoninthebrowser

Automatically exported from code.google.com/p/pythoninthebrowser
0 stars 0 forks source link

Printing or exceptions from background threads break input #9

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
>>> from System.Threading import Thread, ThreadStart
>>> def r():
...  raise Exception('ouch')
>>> t = Thread(ThreadStart(r)
>>> t.Start()

This raises an exception after input has returned to the console - which 
outputs the traceback to 
the console (printing from inside the thread has the same effect) and breaks 
input. This is because 
we cancel keypresses that aren't from position 5 or more (after the prompt).

Original issue reported on code.google.com by fuzzyman on 15 Jun 2008 at 8:44

GoogleCodeExporter commented 8 years ago
Input is no longer *broken* - but the extra output still *interferes* with new 
input.

Original comment by fuzzyman on 17 Jun 2008 at 4:27