ipython/ipython — pull request #1053 by minrk (2011-11-27 09:02:05+00:00)
Title: minor improvements to text placement in qtconsole

* allow `before_prompt=True` behavior to have effect during raw_input
* append 'cannot restart' message before the prompt, so it doesn't
get mixed up with input.

This isn't quite there yet. A known issue - subsequent prints during raw_input are inserted *above* the previous print, rather than below. While these messages do not get into the input area, they can still prevent raw_input from accepting Enter for submission or Esc for clearing. I presume the issue is simply improperly updating the prompt cursor location during raw input.

A background printer, to get stdout coming at peculiar times during input:

```python
import threading
def printer():
while True:
time.sleep(1)
print time.time()
t = threading.Thread(target=printer)
t.start()
```

This branch is ipython-owned, so people with more qtconsole knowledge (e.g. @epatters) are welcome to commit the parts I'm missing.