pwcp
Python with C preprocessor
Installation
pip install pwcp
Running
pwcp <file>
pwcp -m <module>
Or run built-in code module to start interactive console:
pwcp -m code
Run pwcp -h for more options.
Why?
For fun! And for YABI.
How to use it?
The extension for files that need to be preprocessed is .ppy (pre-python).
You can start by creating hello.ppy and putting there something like
#define hello "Hello "
#define world "world!"
print(hello world)
Then run it
~ $ pwcp hello.ppy
Hello world!
Congratulations! You've run your first program with PWCP.
Extension for header files?
Suggested extension is .pyh (python header), but technically you can use whatever you like.
What about comments?
The suggested way to write comments in .ppy (and .pyh) files is /* comment */
// is not a comment as it's floor division in Python and # indicates preprocessor directives.
Does it work with pure Python?
Of course. It works like an extension allowing you to run and import .ppy files. You can import .ppy file in .py file and vice versa.
Feel free to submit an issue if something doesn't work.
Metadata
Release files for pwcp 0.13.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pwcp-0.13.0.tar.gz | 12.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pwcp-0.13.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 24.6 kB
Release files / pwcp-0.13.0.tar.gz
| Download URL | pwcp-0.13.0.tar.gz |
|---|---|
| Size | 12.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7d9128dba6a1806009b30550820a3188d38dbbfe8db7426e4a9af9fa10d25835
|
|
BLAKE2b-256 checksum How to use checksums |
f4ab25edaa9abf829bb9223667e5cb3be9e17dc1db6add825b8c3d64607e463f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 13, 2026.
Transparency logRelease files / pwcp-0.13.0-py3-none-any.whl
| Download URL | pwcp-0.13.0-py3-none-any.whl |
|---|---|
| Size | 11.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7f52c746ed8573b351f5dd39d4be62cd07850d8260f77ec186179c48ca85abbc
|
|
BLAKE2b-256 checksum How to use checksums |
d24334c114015098f22209e7f78719217fd5369bbcea674cba87f2281f84f487
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 13, 2026.
Transparency log