Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!aioe.org!feeder.news-service.com!news2.euro.net!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.049 X-Spam-Evidence: '*H*': 0.90; '*S*': 0.00; 'python': 0.08; 'command.': 0.09; 'subject:library': 0.09; 'wrote:': 0.14; '/dev/null': 0.16; 'btw.': 0.16; 'grep': 0.16; 'module?': 0.16; 'see.': 0.16; 'subject:subprocess': 0.16; 'cc:addr:python-list': 0.17; 'url:code': 0.17; 'header:In-Reply-To:1': 0.21; 'cc:2**0': 0.22; 'statement': 0.26; 'url:mailman': 0.26; 'subject:how': 0.29; 'cc:addr:python.org': 0.30; 'url:listinfo': 0.30; 'goto': 0.30; 'hi,': 0.31; 'it.': 0.31; 'does': 0.33; "i've": 0.33; "i'll": 0.34; 'message-id:@gmail.com': 0.36; 'charset:us-ascii': 0.36; 'running': 0.37; 'received:google.com': 0.37; 'received:209.85': 0.37; 'ways': 0.37; 'url:python': 0.38; 'could': 0.38; 'subject:from': 0.38; 'url:org': 0.38; 'subject:: ': 0.38; 'some': 0.38; 'url:google': 0.38; 'received:209': 0.39; 'header:Mime- Version:1': 0.39; 'header:Message-Id:1': 0.62; 'url:p': 0.63; 'link': 0.64; 'become': 0.72; 'account.': 0.79; 'received:209.85.218.46': 0.91; 'received:mail- yi0-f46.google.com': 0.91; 'to:addr:nobody': 0.98 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:references:in-reply-to:mime-version :content-transfer-encoding:content-type:message-id:cc:x-mailer:from :subject:date:to; bh=3OvbcWMSrpyhXWnEYEvGuyx+4CklmXyAE7mhjjWWM9g=; b=jp6pc/Ad3dQu3eHlnGj4bHKrQpOsE9nw8Qsolf/iSDUzOHAPWVyasNvuvdmBnCLeS/ uYcTTsE0P7n6bG/WjBYGDmZ34J2IYhC38JNFId2DzLeyKpjm+7nnoZBvTEgVIZWULwT/ WkyQLEMKopY6DVqx5fh63dqeb9NwjeV6C3dfk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=references:in-reply-to:mime-version:content-transfer-encoding :content-type:message-id:cc:x-mailer:from:subject:date:to; b=Rk9bXeCBpGMsrSRf+Wk5Ns3DQoGaPw6uSbBQ2lWOSo/XttD8y53Z4F2hDFCdm9K3RO NtF8p+GvOHDX2AHxp6jv1boQ8QsROhY/iSaAb+rou0P6C2KCglYwkr44ZrVG5/XoJKvP fKY41yZrWjiUqyT/lkDsJkoa3R+tfriTuthsA= References: In-Reply-To: Mime-Version: 1.0 (iPhone Mail 8C148) Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii X-Mailer: iPhone Mail (8C148) From: GMail Felipe Subject: Re: how to get PID from subprocess library Date: Sun, 22 May 2011 12:45:22 -0300 To: TheSaint Cc: "python-list@python.org" X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 32 NNTP-Posting-Host: 82.94.164.166 X-Trace: 1306079058 news.xs4all.nl 49175 [::ffff:82.94.164.166]:59132 X-Complaints-To: abuse@xs4all.nl Xref: x330-a1.tempe.blueboxinc.net comp.lang.python:5978 On 22/05/2011, at 10:41, TheSaint wrote: > Kushal Kumaran wrote: >=20 >> You could look for a way to make aria2c not become a daemon and use >> subprocess.Popen to start it. That gives you the PID and ways to see >> if the process is still running >=20 > I see. It's a step that I've to get on my account. Unfortunately I'll have= =20 > to study it some more. >=20 > BTW. I removed grep from the command. Python does it with the *in* stateme= nt=20 > :) >=20 >=20 > --=20 > goto /dev/null > --=20 > http://mail.python.org/mailman/listinfo/python-list Hi,=20 For the "ps" command, have you seen the psuti module? The link to it is: http://code.google.com/p/psutil/ Regards, Felipe.=