calling applications from python

Grant Griffin not.this at seebelow.org
Thu Aug 9 16:07:26 EDT 2001


In article <3b72ba42_1 at nnrp1.news.uk.psi.net>, "Jesper says...
>
>It is possible to call applications from a python program using, e.g.
>the os.system command:
>
>os.system("ls -l")
>
>Is it possible to attach the output from this command to a file?
>I would like to be able to read this output, instead of just sending it to
>stdout.

I think what you want is "os.pipe", which is described in "File Descriptor
Operations" section of the os module.

which-is-cleverly-hidden-there-so-folks-like-you-and-me
   -won't-find-it-when-we-hunt-around-in-the
   -'Process-Management'-section-ly y'rs,

=g2

_____________________________________________________________________

Grant R. Griffin                                       g2 at dspguru.com
Publisher of dspGuru                           http://www.dspguru.com
Iowegian International Corporation            http://www.iowegian.com




More information about the Python-list mailing list