A Python extension to run C code in Python
Project description
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");
... return 0;
... }
... """)
hi
exit code: 0
>>> c4.execute(r"""
... int main(int argc, char **argv) {
... printf("%s", argv[0]);
... return 0;
... }
... """, "hi")
hi
exit code: 0
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
pyc4-1.0.0.tar.gz
(13.3 kB
view hashes)