Hrvoje Niksic <hrvoje.niksic <at> avl.com> writes: > > Of course; simply use the >&- pseudo-redirection, which has been a > standard sh feature (later inherited by ksh and bash, but not csh) for > ~30 years. The error message is amusing, too: > > $ python -c 'print "foo"' >&- > close failed in file object destructor: > Error in sys.excepthook: > > Original exception was: Python 3 complains at startup and is a bit more explicit: $ ./python -c '1' >&- Fatal Python error: Py_Initialize: can't initialize sys standard streams OSError: [Errno 9] Bad file descriptor Abandon Of course, if it is stderr that you explicitly close, you lose all reporting: $ ./python -c '1' 2>&- Abandon Regards Antoine.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4