Notes if we have C source code that we want to execute from Python
we can either::
a) Build a library and create a Python wrapper so it looks like a module, eg., swig
b) Build an executable file and call that using subprocess/popen etc
http://docs.python.org/library/subprocess.html#module-subprocess
c) If its one of the common C libraries or a Windows DLL we can
probably use an existing framework to call it. For example ctypes
will access a lot of stuff.
Aucun commentaire:
Enregistrer un commentaire