HEX
Server: Apache
System: Linux beluga.o2switch.net 4.18.0-553.123.2.lve.el8.x86_64 #1 SMP Thu May 7 23:17:13 UTC 2026 x86_64
User: sc3naki1272 (1113)
PHP: 8.3.33
Disabled: NONE
Upload Files
File: //opt/alt/python37/lib/python3.7/site-packages/clint/pipes.py
# -*- 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