embedc-1.00
توضیحات
Python Embedded C
| ویژگی | مقدار |
|---|---|
| سیستم عامل | - |
| نام فایل | embedc-1.00 |
| نام | embedc |
| نسخه کتابخانه | 1.00 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | Fernando Trias |
| ایمیل نویسنده | sub@trias.org |
| آدرس صفحه اصلی | http://pyembedc.sourceforge.net |
| آدرس اینترنتی | https://pypi.org/project/embedc/ |
| مجوز | Artistic License |
Python module for embedding C/C++ code within Python code. It is designed to allow coders to easily speed up slow code by replacing small portions of Python with compiled C/C++ that can transparently read and modify Python variables. Keeping all the code in the same source file simplifies development and improves code readability. All the compiling and linking is done dynamically by the module to further simplify development.
* Embed C/C++ within Python source code
* Automatically compile and dynamically link using GCC
* Access and modify Python variables as C variables
* Support arrays and strings
* Use ctypes for maximum portability
Simple Example:
from embedc import C
a=[1,4,9]
alen=len(a)
C("""
for (int i=0; i<alen; i++) {
a[i] = a[i]*a[i];
}
""")
print a
Output: [1,16,81]
نحوه نصب
نصب پکیج whl embedc-1.00:
pip install embedc-1.00.whl
نصب پکیج tar.gz embedc-1.00:
pip install embedc-1.00.tar.gz