Skip to main content

stdin.size(), stdin.read() functions

Project description

Installation

$ [sudo] pip install stdin

Functions

function __doc__
stdin.isatty() return True if stdin is open and connected to a tty(-like) device, else False
stdin.read() return a string with stdin data
stdin.size() return size in bytes of a stdin

Examples

$ printf "stdin text" | python -c "import stdin;print(stdin.size())"
10
$ echo "stdin text" | python -c "import stdin;print(stdin.size())"
11
python -c "import stdin;print(stdin.read())"

$ echo "stdin text" | python -c "import stdin;print(stdin.read())"
stdin text

python-readme-generator

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

stdin-2019.4.13.tar.gz (1.4 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page