1

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.

2
  • you can set PYTHONPATH to point to the library, and directly import it in the code Commented Mar 29, 2012 at 11:24
  • @avasal I think OP means the .so file is not a python module, just a regular .so library. Commented Mar 29, 2012 at 11:26

2 Answers 2

1

You should be able to install ctypes via easy_install on python 2.3/2.4

http://pypi.python.org/pypi/ctypes

Sign up to request clarification or add additional context in comments.

Comments

0

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.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.