Need Assistance on this program.

Tim Golden mail at timgolden.me.uk
Fri May 13 03:40:10 EDT 2011


On 13/05/2011 06:22, vijay swaminathan wrote:
> Hi Tim.,
>
> Thanks.. This works as I had expected.
>
> are there any documentation for the subprocess.call method? I tried
> going through the python doc but could not narrow down.

http://docs.python.org/library/subprocess.html?highlight=subprocess%20call#subprocess.call


> I just wanted to
> know how do I pass an arguement after invoking the command prompt?

Well, now, that's a whole 'nother can of worms :) The more
so since you're relying on a command prompt.

Can I suggest you read around the Popen.communicate method:

http://docs.python.org/library/subprocess.html?highlight=subprocess%20call#subprocess.Popen.communicate

and some of the examples below and try something out for yourself.
It can be a little bit fiddly, but you'll do better if you get
something up-and-running (or up-and-failing) and then ask for advice
on where you're going wrong.

TJG



More information about the Python-list mailing list