Python package bytesbufio
bytesbufio provides BytesBufferIO - an io.BytesIO implementation whose value can be accessed after it has been closed
Installation
pip install bytesbufio
Usage
import io
from bytesbufio import BytesBufferIO
bytesbuf = BytesBufferIO()
with io.TextIOWrapper(bytesbuf, encoding='utf-8') as textout:
textout.write("Hello world.")
text = bytesbuf.getvalue().decode('utf-8') # BytesIO would have raised an ValueError here
print(text)
Related
- Python Issue 22003 - BytesIO and shared bufferes
- Python Issue 23099 - value not available after close
License
Copyright (c) 2020 by Cornelius Buschka.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
bytesbufio-1.0.3.tar.gz
(3.0 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file bytesbufio-1.0.3.tar.gz.
File metadata
- Download URL: bytesbufio-1.0.3.tar.gz
- Upload date:
- Size: 3.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.1.2 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.8.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a2cb1986e7c7a57cb7c204196a20178f381676503cd984786789a77e351bd62d
|
|
| MD5 |
801f769b1a9203216f9055c04b420156
|
|
| BLAKE2b-256 |
63469b8a5d4df43b559072af6e7bfd56b51c018eca9818f77eb72925ea530621
|
File details
Details for the file bytesbufio-1.0.3-py3-none-any.whl.
File metadata
- Download URL: bytesbufio-1.0.3-py3-none-any.whl
- Upload date:
- Size: 3.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.1.2 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.8.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e4063ff349b28bdc1458f425cf47597de06d01dbbbc6a3687271b4b7b1fe38eb
|
|
| MD5 |
fe9626da9cc0b3af74e7c8eddc15bed9
|
|
| BLAKE2b-256 |
83fb954032f95ddefd56200be4d26d9dacb553628379fdb042b775bfd00a8a3e
|