Captures stdout
Project description
Captures stdout
pip install capture-stdout-decorator
from capture_stdout_decorator import print_capture
@print_capture
def hahaha():
print("babab")
return 4
@print_capture(print_output=False, return_func_val=False)
def hahaha2():
print("babab")
return 4
x = hahaha()
print(f'{x=}')
y = hahaha2()
print(f'{y=}')
# output:
babab
x=(4, 'babab\n')
y='babab\n'
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
Built Distribution
File details
Details for the file capture_stdout_decorator-0.10.tar.gz
.
File metadata
- Download URL: capture_stdout_decorator-0.10.tar.gz
- Upload date:
- Size: 3.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3050c7511491f0607605e6c043a0c4b5edc8c7fc02e5a36895ff3ad80baeddb9 |
|
MD5 | 1ca416cc494fed3ebf532df0dc64b5c0 |
|
BLAKE2b-256 | 1152af819e625edb0b66a7913e4e77de77d16b1832816b44a1ed1a97a5e97407 |
File details
Details for the file capture_stdout_decorator-0.10-py3-none-any.whl
.
File metadata
- Download URL: capture_stdout_decorator-0.10-py3-none-any.whl
- Upload date:
- Size: 4.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ec61ae42a7558f0751476320c29ff2bd11edf5e44763a95bc40fce1c5adb6605 |
|
MD5 | 86e8f44e34365a78d8cd1314523c8163 |
|
BLAKE2b-256 | dee17c95f014a63970bedd455884277e47015a05788c85b7b3f2cb7a9ee837e5 |