01 Cython and CPython

Cython is two closely related things:
• Cython is a programming language that blends Python with the static type system
of C and C++.
• cython is a compiler that translates Cython source code into efficient C or C++
source code. This source can then be compiled into a Python extension module or
a standalone executable.

CPython 是基于C的python解释器,是python的一种。

Cython 则是一种部分包含和改变C语言、完全包含pyhton语言的一个编程语言,没错,它是一种编程语言,是python语言的一个超集,语法是Python语言语法和c语言语法的混血。cython的文件后缀是.pyx,里面可以运行纯python文件,也可以编写C/C++语言。

the various ways to compile Cython code so that it can be run
by Python.
• Cython code can be compiled and run interactively from an IPython interpreter.
• It can be compiled automatically at import time.
• It can be separately compiled by build tools like Python’s distutils.
• It can be integrated into standard build systems such as make, CMake, or SCons.

Windows配置Cython:

https://blog.csdn.net/wanzew/article/details/106168257

猜你喜欢

转载自blog.csdn.net/wanzew/article/details/106178593
今日推荐