473,396 Members | 1,915 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Accessing shared library file...

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
6 1758
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
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
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
Where is the ctypes mailing list?

Sep 16 '05 #5
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
Ernesto wrote:
Where is the ctypes mailing list?


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

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Mike M | last post by:
Hello, I created a simple C# library assembly that exposes general facilities I would like to use in my ASP.NET web applications. If I added the assembly into the bin directory of my asp.net...
2
by: Gopi | last post by:
Hi all, I need to find the size of a file which is located on a remote unix box.I have been given Samba mount acces for the shared folder through which i can access the file. I am using Fileinfo...
9
by: Srinivas | last post by:
hi all how to access the outlook user profiles through VB.net any help.... thanks in advanc Srinivas
4
by: Khalique | last post by:
I have built a web service whose purpose is to copy files from a secure place to client machine and vice versa. The problem I am having is perhaps related to permissions and access rights. For...
2
by: Fred | last post by:
Hi, I have 2 servers and I would like to access shared files on server 1 from an asp page situated in the server 2 (with the filesystem object). I can't do it, I think, due to access...
7
by: akennis | last post by:
First of all, sorry for duplicating this post. I put it up in the alt.comp.lang.learn.c-c++ mistakenly. I'm investigating a problem whereby exceptions thrown from functions in a Shared Library...
2
by: leby | last post by:
Hi all, Thanks for haveing this group. I am in search of a solution to Q. Thought of geeting the same from experts. I have c files to generate shared libraries (not relating to...
5
by: David T. Ashley | last post by:
I've occasionally had trouble compiling and linking programs that use shared libraries. That never made a lot of sense to me, because I thought the operating system went hunting for the symbols...
37
by: Neo | last post by:
Hi, I want to write a program that essentially connects to web, access some web page and pass some parameters and fetch the return values and print like LWP in Perl Context. Can some one...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.