By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,768 Members | 2,004 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,768 IT Pros & Developers. It's quick & easy.

Accessing shared library file...

P: n/a
I'm in the process of moving a Python application from Windows to
Linux. This means that the drivers for windows ".dll" now must be
Linux drivers "shared library file" (.so I think). With Windows, I
used:

ctypes ("from ctypes import windll")

Then "_dll = windll.NAME"

I'm not sure how to include this new Linux library. Any suggestions?
Thanks!

Sep 15 '05 #1
Share this Question
Share on Google+
6 Replies


P: n/a
You need to tell us what library file (.dll) are you
accessing on Windows. The interface to whatever the
..dll is used for will most likely be completely
different on Linux.

-Larry Bates

Ernesto wrote:
I'm in the process of moving a Python application from Windows to
Linux. This means that the drivers for windows ".dll" now must be
Linux drivers "shared library file" (.so I think). With Windows, I
used:

ctypes ("from ctypes import windll")

Then "_dll = windll.NAME"

I'm not sure how to include this new Linux library. Any suggestions?
Thanks!

Sep 15 '05 #2

P: n/a
The .dll file is a shared library file that is associated with a
programming interface for a semi-conductor chip. The chip drivers come
in two different flavors: One is a .dll (for Windows) and the other is
a shared library file for Linux. The name of the Linux file is
"nameofFile.so.0.4.5" The company that makes these drivers (FTDI) says
that the API's for both OS's are practically the same (except you
obviously cannot use WIN32 functions when running on Linux). I wish I
knew more about Linux drivers...

Sep 15 '05 #3

P: n/a
Ernesto wrote:
The .dll file is a shared library file that is associated with a
programming interface for a semi-conductor chip. The chip drivers come
in two different flavors: One is a .dll (for Windows) and the other is
a shared library file for Linux. The name of the Linux file is
"nameofFile.so.0.4.5" The company that makes these drivers (FTDI) says
that the API's for both OS's are practically the same (except you
obviously cannot use WIN32 functions when running on Linux). I wish I
knew more about Linux drivers...


I believe Larry misinterpreted the question, thinking you were asking
about how to call routines in the library, not just how to load the
library itself. I don't know the answer either, but I can at least
suggest that asking in the ctypes mailing list is pretty much certain to
get you a quick, correct answer (assuming no one gives one here).

-Peter
Sep 16 '05 #4

P: n/a
Where is the ctypes mailing list?

Sep 16 '05 #5

P: n/a
Ernesto wrote:
The .dll file is a shared library file that is associated with a
programming interface for a semi-conductor chip. The chip drivers come
in two different flavors: One is a .dll (for Windows) and the other is
a shared library file for Linux. The name of the Linux file is
"nameofFile.so.0.4.5" The company that makes these drivers (FTDI) says
that the API's for both OS's are practically the same (except you
obviously cannot use WIN32 functions when running on Linux). I wish I
knew more about Linux drivers...


on linux, usually *all* library files are stored in dedicated
directories like /lib /usr/lib or /usr/local/lib you can then acces the
lib just by 'nameofFile'. example: if you have
'/usr/lib/libqt-mt.so.3.3.4' installed, you only need to tell the
compiler to use the library 'qt-mt'. You can create a seperate lib
directory for your project, but you probably need to set some
environment variables for that. I believe pyrex is your friend when
dealing with C libraries in python.
Sep 16 '05 #6

P: n/a
Ernesto wrote:
Where is the ctypes mailing list?


GIYF (Google is your friend)
Sep 16 '05 #7

This discussion thread is closed

Replies have been disabled for this discussion.