pyc4
A Python extension to run C code in Python based on c4.
Install
pip install pyc4
Use
The first argument is the code the rest are the argv
>>> import c4
>>>
>>> c4.execute(r"""
... int main() {
... printf("hi\n");
... return 0;
... }
... """)
hi
0
>>> c4.execute(r"""
... int main(int argc, char **argv) {
... printf("%s\n", argv[0]);
... return 1;
... }
... """, "hi")
hi
1
Metadata
Release files for pyc4 1.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pyc4-1.0.1.tar.gz | 13.3 kB | Details |
Release files / pyc4-1.0.1.tar.gz
| Download URL | pyc4-1.0.1.tar.gz |
|---|---|
| Size | 13.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b118475ea660baf23aa71b66519d8730f06ded42ff7c27998cd835913d2b341f
|
|
BLAKE2b-256 checksum How to use checksums |
8f20891b59fa62d01820d36c73347f98ea247a5e359c0e981276ae93028a9580
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.12.3
|