shell command output
William Park
parkw at better.net
Mon May 21 03:03:08 EDT 2001
More information about the Python-list mailing list
Mon May 21 03:03:08 EDT 2001
- Previous message (by thread): Secret readinto() method for file objects?
- Next message (by thread): shell command output
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Sun, May 20, 2001 at 10:06:58PM -0700, Sorin Gherman wrote:
> The only solution I can think of is to use a temp file:
>
> os.system("diff f1 f2 > tmp")
> tmpfile = open("tmp")
> tmpcontent = tmpfile.readlines()
> for line in tmpcontent:
> print line
>
> Is there any solution to avoid the temp file?
popen() in 'os' module.
--
William Park, Open Geometry Consulting, <opengeometry at yahoo.ca>.
8 CPU, (Slackware) Linux, Python, LaTeX, Vim, Mutt, Sc.
- Previous message (by thread): Secret readinto() method for file objects?
- Next message (by thread): shell command output
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list