When I start python in a new 14.04 LTS gnome-terminal it is 80 character wide:
$ python
>>> import os
>>> os.popen('stty size', 'r').read()
'24 80\n'
When I resize the gnome-terminal the new size is reported:
>>> os.popen('stty size', 'r').read()
'23 170\n'
However, the input python prompt does not see the resizing and begins to overwrite the beginning of the line when I write long lines:
nm> 1234567890qwertyuiopåasdfghjklæøzxcvbnm1234567890qwertyuiopåasdfghjklæøzxcvb
Here 'nm' is wrapped.
A reset from the menu of the gnome-terminal does not help. Is there a way to inform the python interpreter that the window is resized?