Metadata-Version: 2.1
Name: pyc4
Version: 1.0.0
Summary: A Python extension to run C code in Python
Home-page: https://github.com/donno2048/pyc4
Author: Elisha Hollander
Author-email: just4now666666@gmail.com
License: GPL-2.0
Project-URL: Documentation, https://github.com/donno2048/pyc4#readme
Project-URL: Bug Reports, https://github.com/donno2048/pyc4/issues
Project-URL: Source Code, https://github.com/donno2048/pyc4
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
Description-Content-Type: text/markdown
License-File: LICENSE

# pyc4

A Python extension to run C code in Python based on [c4](https://github.com/rswier/c4).

## Install

```sh
pip install pyc4
```

## Use

The first argument is the code the rest are the `argv`

```py
>>> 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
```
