简体   繁体   中英

Can C run compiled Python code (.pyc files)?

考虑到主要的Python实现C用C编写,并且存在可以将Python代码转换为C的库,是否有可能在C或C ++中运行已编译的Python字节码?

First, you cannot run anything in C, C is a programming language. You can embed python in your C program (see Documentation ), because python can be compiled as library. But Python is not only the pyc-File, but consists of many modules, that make python as powerful as it is.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM