Quantcast
Channel: Active questions tagged windows - Super User
Viewing all articles
Browse latest Browse all 9562

How do I redirect output from python to file

$
0
0

I want to redirect all output (stdout and stderr) of console to the text file. I make the following steps:

  1. Open cmd.exe
  2. Start command:

    "python.exe">"file.txt"

After that, I'm waiting for the python's output in the file, but it's still in console. What I'm doing wrong?


Viewing all articles
Browse latest Browse all 9562

Trending Articles