How can I load a library in Python and run a few of its methods available with the library. I am aware of ctypes but its not available in python2.4. Is there any equivalent module for python2.4? And how do I run a few of its methods available in library.
-
you can set PYTHONPATH to point to the library, and directly import it in the codeavasal– avasal2012-03-29 11:24:01 +00:00Commented Mar 29, 2012 at 11:24
-
@avasal I think OP means the .so file is not a python module, just a regular .so library.Not_a_Golfer– Not_a_Golfer2012-03-29 11:26:26 +00:00Commented Mar 29, 2012 at 11:26
Add a comment
|
2 Answers
You should be able to install ctypes via easy_install on python 2.3/2.4
Comments
Although ctypes was only added to the standard Python distribution in version 2.5, it is available for earlier versions, including version 2.4. Your only alternative to installing ctypes is to write a Python extension.