On Mon, Oct 19, 2009 at 11:14 AM, Bryan Irvine <sparcta...@gmail.com> wrote: > I'm a python n00b and so pardon me in advance if this is really stupid > question. > > I have my suspicions but why does the following not work the way I'm > anticipating it will? > > (python 2.4.4) > >>>> import os >>>> if (os.system('echo test')): <snip>
It's best to avoid os.system(). Use the newer `subprocess` module instead: http://docs.python.org/library/subprocess.html Cheers, Chris -- http://blog.rebertia.com -- http://mail.python.org/mailman/listinfo/python-list