Last active
April 19, 2017 05:20
-
-
Save lig/b4b4d0665292e09616a18239ee335142 to your computer and use it in GitHub Desktop.
stdouterr
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ python3 stdouterr.py | |
stdout | |
stderr | |
$ python3 stdouterr.py 2>&1 >/dev/null | |
stderr | |
$ python3 stdouterr.py &>/dev/null | |
$ python3 stdouterr.py >/dev/null 2>&1 | |
$ python3 stdouterr.py >/dev/null | |
stderr |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
sys.stdout.write("stdout\n") | |
sys.stderr.write("stderr\n") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment