I've got a Python script that does a bunch of things in a single subthread, and I'd like the main thread to spit out raw_input("> ")
(to be handled by the main thread), and keep that input on the bottom of the console, while the subthread prints things above. I originally thought I could use something like print "\\b\\b" + message + "\\n> "
in the subbthread, but that doesn't account for things like characters the user has typed in. So, the console would look something like this:
[22:04] Started
[22:06] Some output
[22:06] Some more output
>
Is this possible?
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.