[Tutor] os.system() problem

dave selby dave6502 at googlemail.com
Sun Feb 3 18:54:39 CET 2008


Hi all,

I am not sure if this is a Python or bash issue :).

In bash if I execute 'motion' with the following ...

dave at dev-machine:~/.kde/share/apps/kmotion$ motion &> /dev/null &
[1] 10734
dave at dev-machine:~/.kde/share/apps/kmotion$

I get what I expect, a background job, however if I execute it from
Python with an os.system ...

os.system('motion &> /dev/null &')

I get tons of output to the BASH shell ...

[0] Processing thread 0 - config file /etc/motion/motion.conf
[0] Processing config file /etc/motion/motion.1.conf
[0] Processing config file /etc/motion/motion.2.conf
[1] Thread is from /etc/motion/motion.1.conf
[2] Thread is from /etc/motion/motion.2.conf
[1] Thread started
[2] Thread started
[1] File of type 2 saved to: /var/lib/motion/20080203/01/tmp/175253.jpg
...etc ...

I just can't work out why this is happening & how to stop it ?. Any ideas ?

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