I am able to successfully parse a c file containing a function i want to use in python. now i cannot figure how to either a) call said function or b) create a .py file with said function.
All i have is this mysterious "ast" object
This is a large undertaking. pycparser only gives you the front-end of the compiler. The backend you'll have to implement yourself.
For an existing project that uses pycparser just for this purpose (calling C from Python), see cffi.
Copyright © 2021 Jogjafile Inc.
This is a large undertaking. pycparser only gives you the front-end of the compiler. The backend you'll have to implement yourself.
For an existing project that uses pycparser just for this purpose (calling C from Python), see cffi.