C++-style IO with streams
Project description
This is a library that implements C++-style IO with streams in Python. It is not a wrapper around the actual C++ streams, but instead provides a higher-level interface that is more Pythonic.
For example
#include <iostream>
#include <fstream>
std::cout << "Hello, " << "World!" << std::endl;
std::ofstream ostrm("test.txt");
ostrm << "Hello, World!" << std::endl;
translates to
import cppstream
cppstream.cout << "Hello, " << "World!" << cppstream.endl
ostrm = cppstream.OutFileStream()
# or using the context manager
with cppstream.OutFileStream() as ofs:
ofs.open("test.txt")
ofs << "beans" << cppstream.endl
See the inheritance diagram:
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
cppstream-0.1.0.tar.gz
(4.7 kB
view hashes)
Built Distribution
Close
Hashes for cppstream-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3eb7c20727018d95566b1645ed322885a9f3d882c2097d87b3150874353f1488 |
|
MD5 | 2e87426aa663c2bee04411312e23f9e3 |
|
BLAKE2b-256 | 49b6e688cf1da314851a89fdaf1acba7e55ca8419873c8703d49d472b8d8d236 |