Python script output in file

Robert Clove cloverobert at gmail.com
Wed Mar 18 23:56:45 EDT 2015


On Wed, Mar 18, 2015 at 7:10 PM, Rustom Mody <rustompmody at gmail.com> wrote:

> On Thursday, March 19, 2015 at 1:58:29 AM UTC+5:30, Albert-Jan Roskam
> wrote:
> > ----------------------------
> > On Wed, Mar 18, 2015 7:06 PM CET Rustom Mody wrote:
> >
> > >On Wednesday, March 18, 2015 at 8:12:12 PM UTC+5:30, Robert Clove wrote:
> > >> ./my_eth_script.pl eth0 M > a.txt
> > >>
> > >> How can i run this command with subprocess.popen
> > >
> > >Something like this I guess?
> > >
> > >>> proc = Popen("cat", shell=True, stdout=open(inname, "w"),
> stdin=open(outname,"r"))
> >
> >
> > How will the file object associated with in name be closed? (When is
> close() method called?
>
> Just like the close-paren in the line above <wink>
> --
> https://mail.python.org/mailman/listinfo/python-list



Thanks all :)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20150318/f1aafcc2/attachment.html>


More information about the Python-list mailing list