Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我能够成功解析包含我想在 python 中使用的函数的 ac 文件。现在我不知道如何a)调用所述函数或b)使用所述函数创建一个.py文件。
我只有这个神秘的“ast”对象
这是一项艰巨的任务。pycparser 只为您提供编译器的前端。您必须自己实现的后端。
对于仅出于此目的使用 pycparser 的现有项目(从 Python 调用 C),请参阅cffi。