Hi all,

I'm a newbie to Python (switching from Perl) and had a question about the
best way to run external commands in Python.

In doing some reading I'm confused about which is the best way to accomplish
this.

With Perl, the way I went about running commands was by opening a filehandle
and parsing / manipulating the data.

i.e. open(XYZ, "ls -la *");

In trying to do this in Python, I think I've read a couple ways to do this.

through: os.popen, os.popen2, os.popen3, os.system, commands.getoutput()

I might not be understanding when to use which of these correctly and was
hoping for some feedback from this more experienced group.

Thanks in advance!
_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to