Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Re: Linux driver library file *.so*

0 views
Skip to first unread message
Message has been deleted

Erik de Castro Lopo

unread,
Sep 16, 2005, 9:51:17 AM9/16/05
to
Ernesto wrote:
>
> I posted this in the PYthon forum, but noone seemed to know an
> answer...
>
> I'm in the process of moving a Python application from Windows to
> Linux. This means that the drivers for windows ".dll"

A ".dll" file is not a driver, its a Dynamic Link Library.

> now must be
> Linux drivers "shared library file" (.so I think).

Yes, Shared Object files in Linux are roughly equivalent to windows DLLs

> With Windows, I used:
>
> ctypes ("from ctypes import windll")
>
> Then "_dll = windll.NAME"
>
> I'm not sure how to include this new Linux library.

You are asking a very specific and possibly totally superfluous question
without providing enough background information about what you are trying
to do in a more general sense.

Its almost certain that what you are doing on windows can be done
in a better way on Linux.

> Any suggestions?

Yes, provide more information.

Erik
--
+-----------------------------------------------------------+
Erik de Castro Lopo
+-----------------------------------------------------------+
Being really good at C++ is like being really good at using rocks to
sharpen sticks." -- Thant Tessman

Sybren Stuvel

unread,
Sep 16, 2005, 9:57:30 AM9/16/05
to
Ernesto enlightened us with:
> This means that the drivers for windows ".dll" now must be Linux

> drivers "shared library file" (.so I think).

Those aren't drivers, they are libraries. There is a huge difference.
It's like calling all the different types and brands of beer Heineken.

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

That all depends on the library, and isn't Python specific at all. You
need to rewrite the source code of the DLL file into a form you can
compile on Linux.

Why are you using DLL files? What do they do? Did you write them, or
did somebody else? Are they Open Source?

Sybren
--
The problem with the world is stupidity. Not saying there should be a
capital punishment for stupidity, but why don't we just take the
safety labels off of everything and let the problem solve itself?
Frank Zappa

Clark Thompsan

unread,
Sep 16, 2005, 11:00:51 AM9/16/05
to
Thanks for the feedback and sorry for the "superfluous" question. I'm
just trying to figure this out. I'll try to explain it better...

The .dll library files I used for Windows were written by the company
who created the device. I didn't write them and I don't think they're
open source.

With the Linux distribution, I'm not using the .dll files at all. I'm
using a .so shared library file and the same two .h files that came
with Windows.

I'm not sure I understand this...


> You need to rewrite the source code of the DLL file into > a form you can compile on Linux.

I believe the company who created these libraries files included
similar resources in both the .dll and .so file. I'm just not sure how
to write the wrapper (in Python) for the Linux library.

I apologize for my "newbie-ness" and I really appreciate all the help.
Thanks a bunch,
-Ernie

Sybren Stuvel

unread,
Sep 16, 2005, 11:20:36 AM9/16/05
to
Clark Thompsan enlightened us with:

> The .dll library files I used for Windows were written by the
> company who created the device.

What device?

> I'm using a .so shared library file and the same two .h files that
> came with Windows.

Did the .h files AND the .so file come with Windows? Or did they come
from separate sources?

> I believe the company who created these libraries files included
> similar resources in both the .dll and .so file. I'm just not sure
> how to write the wrapper (in Python) for the Linux library.

In that case just read the documentation on the Python website about
writing Python extensions.

Clark Thompsan

unread,
Sep 16, 2005, 12:11:13 PM9/16/05
to
Thanks so much for your help ! I'll wait a while before I bother ya'll
again ; )

0 new messages