Skip to main content

cpp2py

A tool to convert c/c++ code to python code

how to install:

pip install cpp2py

how to use in python:

import cpp2py cpp2py.c2py(input_c_file_path, output_py_file_name) cpp2py.py2c(input_py_file_path, output_c_file_name)

from cpp2py import cpp2py
cpp2py.c2py('./c1.c', 'c1.py')

c1.c:

int main(int argc, char **argv)
{
int a=1;
int b=2;
int c;
c=a+b;
return 0;
}

generated: c1.py

def main(argc, argv):
	a = 1
	b = 2
	c = a+b
	return 0


how to use in cmd(TBD):

python -m cpp2py -i input_c_file_path -o output_py_file_path -f convert_format eg: python -m cpp2py -i input_file.c -o output.py -f c2py

convert_format: c2py py2c cpp2py py2cpp

current stage

c2py C
py2c X
cpp2py X
py2cpp X

x--not finished
y--finished
C--partly working

Metadata

Release files for cpp2py 0.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for cpp2py 0.0.2
File Interpreter ABI Platform
cpp2py-0.0.2-py3-none-any.whl Python 3 none any Details

Release files / cpp2py-0.0.2-py3-none-any.whl

Download URL cpp2py-0.0.2-py3-none-any.whl
Size 19.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0920c574801a1f82e5a874c75d46eaa1ba1c2539f390c3108585ef8c1d882472
BLAKE2b-256 checksum
How to use checksums
1af7be2391f34bc8acac7d4e4335329990b68e2022cc9cffe2b39cfeaf094679
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.9

Security for cpp2py 0.0.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.0.2 This release

1 release file No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page