Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #52798 > unrolled thread
| Started by | random832@fastmail.us |
|---|---|
| First post | 2013-08-21 17:27 -0400 |
| Last post | 2013-08-21 17:27 -0400 |
| Articles | 1 — 1 participant |
Back to article view | Back to comp.lang.python
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: Raw_input with readline in a daemon thread makes terminal text disappear random832@fastmail.us - 2013-08-21 17:27 -0400
| From | random832@fastmail.us |
|---|---|
| Date | 2013-08-21 17:27 -0400 |
| Subject | Re: Raw_input with readline in a daemon thread makes terminal text disappear |
| Message-ID | <mailman.108.1377120447.19984.python-list@python.org> |
On Wed, Aug 21, 2013, at 12:42, David M. Welch wrote: > Hi all, > > This is an old thread, but I'm having the same behavior in my terminal > when > I run some code but kill the process in the terminal (Ctrl-C). The code > has > two prime suspects (from a simple google search): > 1. Creates ssh port forward via the subprocess module > (http://unix.stackexchange.com/questions/4740/screen-remote-login-failure-an > d-disappearing-text) > 2. Using the getpass module (raw_input?) > Calling "$ reset" brings back the disappearing text, so I'm just > wondering > if this issue has been addressed and if so, what should I be doing that > I'm > not. Do you understand how tty modes (in particular, echo vs non-echo mode) work? What you've got is two different pieces of code (I think running readline in two threads qualifies) fighting over the tty mode, and probably one of them is turning echo mode off and then either never restoring it because of how the program exits, or it gets into the other's idea of the "original" mode. Why does your program design require input to be handled in a thread other than the main thread?
Back to top | Article view | comp.lang.python
csiph-web