Handle sys.stdin, stdout are None under pythonw.
This commit is contained in:
parent
98f42ad87b
commit
1468f318f8
1 changed files with 3 additions and 2 deletions
|
@ -7,8 +7,9 @@ CLIPBOARD_STRINGS = ['!c', '!clip', '!clipboard']
|
||||||
INPUT_STRINGS = ['!i', '!in', '!input', '!stdin']
|
INPUT_STRINGS = ['!i', '!in', '!input', '!stdin']
|
||||||
EOF = '\x1a'
|
EOF = '\x1a'
|
||||||
|
|
||||||
IN_PIPE = not sys.stdin.isatty()
|
# In pythonw, stdin and stdout are None.
|
||||||
OUT_PIPE = not sys.stdout.isatty()
|
IN_PIPE = (sys.stdin is not None) and (not sys.stdin.isatty())
|
||||||
|
OUT_PIPE = (sys.stdout is not None) and (not sys.stdout.isatty())
|
||||||
|
|
||||||
class PipeableException(Exception):
|
class PipeableException(Exception):
|
||||||
pass
|
pass
|
||||||
|
|
Loading…
Reference in a new issue