{"id":13834406,"url":"https://github.com/andreikop/cpp2python","last_synced_at":"2025-12-30T06:14:27.178Z","repository":{"id":52751363,"uuid":"1917138","full_name":"andreikop/cpp2python","owner":"andreikop","description":"C++ to Python converter","archived":false,"fork":false,"pushed_at":"2020-10-01T03:00:38.000Z","size":22,"stargazers_count":169,"open_issues_count":7,"forks_count":80,"subscribers_count":15,"default_branch":"master","last_synced_at":"2024-11-20T19:39:56.081Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/andreikop.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2011-06-18T20:41:34.000Z","updated_at":"2024-11-15T15:35:32.000Z","dependencies_parsed_at":"2022-08-22T18:41:00.853Z","dependency_job_id":null,"html_url":"https://github.com/andreikop/cpp2python","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/andreikop/cpp2python","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andreikop%2Fcpp2python","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andreikop%2Fcpp2python/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andreikop%2Fcpp2python/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andreikop%2Fcpp2python/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/andreikop","download_url":"https://codeload.github.com/andreikop/cpp2python/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andreikop%2Fcpp2python/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264528741,"owners_count":23623218,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-04T14:00:33.845Z","updated_at":"2025-12-30T06:14:27.128Z","avatar_url":"https://github.com/andreikop.png","language":"Python","readme":"# cpp2python\n\nThe script helps to convert C/C++ sources to C/C++ -like Python sources.\n\nIt does some simple edit operations like removing semicolons and type declarations.\nAfter it you must edit code manually, but you'll probably spend less time doing it.\n\nExample:\n```\nif (a \u0026\u0026 b)               --\u003e    if a and b:\n{                         --\u003e        object.method()\n    object-\u003emethod();     --\u003e\n}                         --\u003e\n```\n\nThe utility **will** make mistakes and **will not** generate ready for use code,\ntherefore it won't be useful for you unless you know both C/C++ and Python.\n\nFor better result, it is recommended to format your code to ANSI style\nbefore performing conversion.\n\n```\nastyle --style=ansi your.cpp source.cpp files.cpp\n```\n\n### Usage\n\n    cpp2python.py DIR                     Find C/C++ files in the directory\n                                          by suffix and process.\n    cpp2python.py FILE                    Process the file\n    cpp2python.py -v|--version|-h|--help  Display the help message\n\nAfter the processing new file is created.\nFile name is `{old file name with suffix}.py`. i.e. `main.cpp.py`\n\n### Installation\n(Optional, the script can be used from the source tree)\n\n    python3 setup.py install\n\n\n### Author\nAndrei Kopats \u003chlamer@tut.by\u003e\n\nsetup.py and improvements by Stuart Axon\n\n### License\nGPL\n","funding_links":[],"categories":["Uncategorized"],"sub_categories":["Uncategorized"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandreikop%2Fcpp2python","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fandreikop%2Fcpp2python","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandreikop%2Fcpp2python/lists"}