Re: popen from inside a thread not working!
From: Jeff Epler (jepler_at_unpythonic.net)
Date: 03/11/04
- Next message: Denis S. Otkidach: "Re: RuntimeError: cannot unmarshal code objects in restricted execution mode"
- Previous message: Denis S. Otkidach: "RuntimeError: cannot unmarshal code objects in restricted execution mode"
- In reply to: Steve: "popen from inside a thread not working!"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Thu, 11 Mar 2004 08:34:52 -0600 To: python-list@python.org
Steve,
Must be something in your program or something different between your
environment and mine. There's no reason why the presence of threads
would change whether stdin is a tty.
$ cat steve.py
import os, thread, time
def run_subcommand():
os.system("tty")
def run_subcommand_in_thread():
thread.start_new(run_subcommand, ())
time.sleep(1) # give it plenty of time to complete...
run_subcommand()
run_subcommand_in_thread()
$ python steve.py
/dev/pts/18
/dev/pts/18
Jeff
- Next message: Denis S. Otkidach: "Re: RuntimeError: cannot unmarshal code objects in restricted execution mode"
- Previous message: Denis S. Otkidach: "RuntimeError: cannot unmarshal code objects in restricted execution mode"
- In reply to: Steve: "popen from inside a thread not working!"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|