pipes docs

This commit is contained in:
Kenneth Reitz
2011-03-20 13:06:19 -04:00
parent 3bd8f40189
commit 42c84f24bb
+2 -2
View File
@@ -5,10 +5,10 @@ import sys
__all__ = ('piped_in', )
def piped_in():
"""Returns piped input via stdin, else False."""
"""Returns piped input via stdin, else None."""
with sys.stdin as stdin:
# TTY is only way to detect if stdin contains data
if not stdin.isatty():
return stdin.read()
else:
return None
return None