[Tutor] os.popen3 > subprocess.Popen but nohup.out won't go

dave selby dave6502 at googlemail.com
Sat Apr 4 11:34:01 CEST 2009


Hi,

I have upgraded to python 2.6 and was getting depreciation warnings
about os.popen3 etc so I changed over to subprocess.

os.popen3('nohup %s/core/kmotion_hkd2.py &> /dev/null &' % kmotion_dir)

becomes ..

subprocess.Popen('nohup %s/core/kmotion_hkd2.py &> /dev/null &' %
kmotion_dir, shell=True)

all is well except I now get

nohup: appending output to `nohup.out'

on the terminal which '&> /dev/null' used to ditch to /dev/null. I
think this is because subprocess simulates the
shell differently. Any idea how to ditch to /dev/null in subprocess ?

Cheers

Dave







-- 

Please avoid sending me Word or PowerPoint attachments.
See http://www.gnu.org/philosophy/no-word-attachments.html


More information about the Tutor mailing list