/usr/lib/python3/dist-packages/clint/pipes.py is in python3-clint 0.5.1-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | # -*- coding: utf-8 -*-
"""
clint.pipes
~~~~~~~~~~~
This module contains the helper functions for dealing with unix pipes.
"""
from __future__ import absolute_import
from __future__ import with_statement
import sys
__all__ = ('piped_in', )
def piped_in():
"""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
|