cout & cerr like in C++
Project description
cout & cerr like in C++
Usge:
from stdcpp import cout, cerr, endl
cout << "Hello" << " " << "world!" << endl
cerr << "Hello" << " " << "world!" << endl
Bonus 1:
from stdcpp import Stream
s = Stream('log.txt', 'a+')
s << "Hello "
s.close()
with Stream('log.txt', 'a+') as s:
s << "world!" << endl
Bonus 2:
import io
from stdcpp import Stream, cout
ios = io.StringIO()
s = Stream(ios)
s << "Hello world!" << endl
ios.seek(0)
cout << ios.read()
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
stdcpp-0.3.0.tar.gz
(1.2 kB
view details)
Built Distribution
File details
Details for the file stdcpp-0.3.0.tar.gz
.
File metadata
- Download URL: stdcpp-0.3.0.tar.gz
- Upload date:
- Size: 1.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.6.1 CPython/3.10.12 Linux/5.15.0-91-generic
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 77662cc8eadf31b606461e700298e0bafbb0172778f788fde508cddfc458426a |
|
MD5 | 36c6b84016ee683cbab299c7ef060672 |
|
BLAKE2b-256 | f4153c2386b4fb6530a00b2b20638cd08e9a85569c785165344554e45fc698d3 |
File details
Details for the file stdcpp-0.3.0-py3-none-any.whl
.
File metadata
- Download URL: stdcpp-0.3.0-py3-none-any.whl
- Upload date:
- Size: 1.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.6.1 CPython/3.10.12 Linux/5.15.0-91-generic
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a8085c3a9c67c5123ec8c1e6acaac5f60ff0a930499a6c31ce47517f06cfa89d |
|
MD5 | aff2ba57cc6eda7fcaac0fdfe68f838b |
|
BLAKE2b-256 | ad3e6d896645c179edc2d5da74fd45548d8e20c0bd3431d153fd9928db10f893 |