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


Groups > comp.lang.python > #33977 > unrolled thread

RE: os.popen and the subprocess module

Started by"Prasad, Ramit" <ramit.prasad@jpmorgan.com>
First post2012-11-27 18:27 +0000
Last post2012-11-27 18:27 +0000
Articles 1 — 1 participant

Back to article view | Back to comp.lang.python

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  RE: os.popen and the subprocess module "Prasad, Ramit" <ramit.prasad@jpmorgan.com> - 2012-11-27 18:27 +0000

#33977 — RE: os.popen and the subprocess module

From"Prasad, Ramit" <ramit.prasad@jpmorgan.com>
Date2012-11-27 18:27 +0000
SubjectRE: os.popen and the subprocess module
Message-ID<mailman.317.1354040887.29569.python-list@python.org>
Andrew wrote:
> 
> Hello world,
> 
> I'm working on a script that will run an executable obtaine the output
>  from the executable
> and do some analysis on the output. Essentially the script runs the
> executable analyses
> the data.
> I'm looking into os.popen and the subprocess module, implementing os.popen
> is easy but i hear
> it is depreciating  however I'm finding the implemantation of subprocess
> daunting can anyone help
> 

Have you read the documentation?

http://docs.python.org/library/subprocess.html#replacing-older-functions-with-the-subprocess-module
(specifically 17.1.4.5)

This may help as well.
http://www.doughellmann.com/PyMOTW/subprocess/#capturing-output

Note, use of shell=True is usually discouraged as it can be
unsafe.


~Ramit



This email is confidential and subject to important disclaimers and
conditions including on offers for the purchase or sale of
securities, accuracy and completeness of information, viruses,
confidentiality, legal privilege, and legal entity disclaimers,
available at http://www.jpmorgan.com/pages/disclosures/email.  

[toc] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web