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


Groups > comp.lang.python > #5283

Re: Need Assistance on this program.

Path csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!aioe.org!feeder.news-service.com!feeder1.cambriumusenet.nl!feed.tweaknews.nl!194.109.133.84.MISMATCH!newsfeed.xs4all.nl!newsfeed5.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Return-Path <mail@timgolden.me.uk>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.005
X-Spam-Evidence '*H*': 0.99; '*S*': 0.00; 'python': 0.07; 'from:addr:timgolden.me.uk': 0.09; 'from:name:tim golden': 0.09; 'message-id:@timgolden.me.uk': 0.09; 'method:': 0.09; 'examples': 0.12; 'wrote:': 0.14; 'expected.': 0.16; 'invoking': 0.16; 'narrow': 0.16; 'prompt?': 0.16; 'received:74.55.86': 0.16; 'received:74.55.86.74': 0.16; 'received:smtp.webfaction.com': 0.16; 'received:webfaction.com': 0.16; 'suggest': 0.19; 'command': 0.19; 'cc:no real name:2**0': 0.20; 'cc:2**0': 0.20; '(or': 0.22; 'header:In-Reply-To:1': 0.22; 'cc:addr:python-list': 0.22; 'doc': 0.23; 'pass': 0.27; 'tried': 0.27; 'cc:addr:python.org': 0.31; 'relying': 0.31; 'tjg': 0.31; 'url:library': 0.31; 'url:docs': 0.33; 'yourself.': 0.33; 'bit': 0.33; 'received:192': 0.34; 'there': 0.35; 'header:User-Agent:1': 0.35; 'received:192.168': 0.37; 'some': 0.37; 'url:python': 0.37; 'but': 0.38; 'url:org': 0.38; 'could': 0.39; 'where': 0.39; 'how': 0.39; 'works': 0.40; 'from:addr:mail': 0.60; 'below': 0.63; 'url:%20': 0.71; 'subject:this': 0.79; 'worms': 0.84; 'to:none': 0.92
Date Fri, 13 May 2011 08:40:10 +0100
From Tim Golden <mail@timgolden.me.uk>
User-Agent Mozilla/5.0 (Windows; U; Windows NT 6.1; en-GB; rv:1.9.2.17) Gecko/20110414 Lightning/1.0b2 Thunderbird/3.1.10
MIME-Version 1.0
CC python-list@python.org
Subject Re: Need Assistance on this program.
References <BANLkTi=HJ6Ve2t9=EP1sGfMbR6ZoLtgy7g@mail.gmail.com> <sa0hb901dor.fsf@gmail.com> <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>
In-Reply-To <BANLkTin6T6tepXODsicw5r=EFFRxagGiBw@mail.gmail.com>
Content-Type text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding 7bit
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.12
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.1508.1305272414.9059.python-list@python.org> (permalink)
Lines 27
NNTP-Posting-Host 82.94.164.166
X-Trace 1305272414 news.xs4all.nl 41113 [::ffff:82.94.164.166]:41155
X-Complaints-To abuse@xs4all.nl
Xref x330-a1.tempe.blueboxinc.net comp.lang.python:5283

Show key headers only | 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