redirect and python

Q

questions?

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.

What's the trick in here?

Thanks
 
S

Sybren Stuvel

questions? enlightened us with:
The things put to screen doesn't redirect to the file I want.

What do you see on screen? What do you want to redirect to the file?
What's the trick in here?

Giving us useful information.

Sybren
 
F

Fredrik Lundh

questions? said:
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>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,283
Messages
2,571,405
Members
48,098
Latest member
inno vation

Latest Threads

Top