pyc4


Namepyc4 JSON
Version 1.0.1 PyPI version JSON
download
home_pagehttps://github.com/donno2048/pyc4
SummaryA Python extension to run C code in Python
upload_time2024-05-13 10:20:51
maintainerNone
docs_urlNone
authorElisha Hollander
requires_pythonNone
licenseGPL-2.0
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # 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\n");
...     return 0;
... }
... """)
hi
0
>>> c4.execute(r"""
... int main(int argc, char **argv) {
...     printf("%s\n", argv[0]);
...     return 1;
... }
... """, "hi")
hi
1
```

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/donno2048/pyc4",
    "name": "pyc4",
    "maintainer": null,
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": null,
    "keywords": null,
    "author": "Elisha Hollander",
    "author_email": "just4now666666@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/8f/20/891b59fa62d01820d36c73347f98ea247a5e359c0e981276ae93028a9580/pyc4-1.0.1.tar.gz",
    "platform": null,
    "description": "# pyc4\n\nA Python extension to run C code in Python based on [c4](https://github.com/rswier/c4).\n\n## Install\n\n```sh\npip install pyc4\n```\n\n## Use\n\nThe first argument is the code the rest are the `argv`\n\n```py\n>>> import c4\n>>>\n>>> c4.execute(r\"\"\"\n... int main() {\n...     printf(\"hi\\n\");\n...     return 0;\n... }\n... \"\"\")\nhi\n0\n>>> c4.execute(r\"\"\"\n... int main(int argc, char **argv) {\n...     printf(\"%s\\n\", argv[0]);\n...     return 1;\n... }\n... \"\"\", \"hi\")\nhi\n1\n```\n",
    "bugtrack_url": null,
    "license": "GPL-2.0",
    "summary": "A Python extension to run C code in Python",
    "version": "1.0.1",
    "project_urls": {
        "Bug Reports": "https://github.com/donno2048/pyc4/issues",
        "Documentation": "https://github.com/donno2048/pyc4#readme",
        "Homepage": "https://github.com/donno2048/pyc4",
        "Source Code": "https://github.com/donno2048/pyc4"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "8f20891b59fa62d01820d36c73347f98ea247a5e359c0e981276ae93028a9580",
                "md5": "31c6db59d3ea2434f881a6f2bcf0e003",
                "sha256": "b118475ea660baf23aa71b66519d8730f06ded42ff7c27998cd835913d2b341f"
            },
            "downloads": -1,
            "filename": "pyc4-1.0.1.tar.gz",
            "has_sig": false,
            "md5_digest": "31c6db59d3ea2434f881a6f2bcf0e003",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 13264,
            "upload_time": "2024-05-13T10:20:51",
            "upload_time_iso_8601": "2024-05-13T10:20:51.369978Z",
            "url": "https://files.pythonhosted.org/packages/8f/20/891b59fa62d01820d36c73347f98ea247a5e359c0e981276ae93028a9580/pyc4-1.0.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-05-13 10:20:51",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "donno2048",
    "github_project": "pyc4",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "pyc4"
}
        
Elapsed time: 0.26587s