"Ansuman Dash" <ansuman.d...@gmail.com> wrote

In Python scripting, how can I execute a command (which can be run from
spcific directory) and then retrieve the result (after executing the command it give the command is executed successfull or not), so that I can validate
it.

There are sweveral ways to do this but the preferred route is using the
subprocess module.

You can see examples of several of the options in the Using the OS
topic in my tutorial, under the heading "Manipulating Processes".

HTH,


--
Alan Gauld
Author of the Learn to Program web site
http://www.alan-g.me.uk/

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

Reply via email to