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
Project details
Release history Release notifications | RSS feed
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.3.24.tar.gz
(1.4 kB
view hashes)
Built Distribution
Close
Hashes for stdin-2019.3.24-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2b31bfa0b2ae299793dbbcddb9db6449e0fb9db87cf3fa176b447d8e6027a899 |
|
MD5 | 6419e083c40960b9d8459b92d1c3f9ba |
|
BLAKE2b-256 | 575871cab00aca699722ef7bee37b90ebdb45ede727d1d148df414a4598fa2c5 |