Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #5283

Re: Need Assistance on this program.

Date 2011-05-13 08:40 +0100
From Tim Golden <mail@timgolden.me.uk>
Subject Re: Need Assistance on this program.
References (2 earlier) <BANLkTi=PW6xCTQ9ReYFdtgO+rnU2tAW_Ww@mail.gmail.com> <4DCBB18B.5050309@timgolden.me.uk> <BANLkTimX-tDpveXUqdGy2vBCWuqQ0VPabA@mail.gmail.com> <4DCBB88A.8020702@timgolden.me.uk> <BANLkTin6T6tepXODsicw5r=EFFRxagGiBw@mail.gmail.com>
Newsgroups comp.lang.python
Message-ID <mailman.1508.1305272414.9059.python-list@python.org> (permalink)

Show all headers | View raw


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

Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

Re: Need Assistance on this program. Tim Golden <mail@timgolden.me.uk> - 2011-05-13 08:40 +0100

csiph-web