redirect and python
Fredrik Lundh
fredrik at pythonware.com
Thu Feb 2 06:06:56 EST 2006
"questions?" wrote:
>I am calling system command in python by os.system()
>
> I do, os.system("wget http://blah blah blah")
>
> then I run the program by ./programname >redirected file
> The things put to screen doesn't redirect to the file I want.
the ">" operator redirects standard output only, but wget prints stuff to the
standard error channel.
> What's the trick in here?
the wget documentation explains how to redirect wget output. if you don't
have the manual page, you can do
wget --help
to get a list of options. see the section "Logging and input files" for the options
you need.
</F>
More information about the Python-list
mailing list