Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #28620

Re: Accessing dll

Date 2012-09-06 18:17 +0100
From MRAB <python@mrabarnett.plus.com>
Subject Re: Accessing dll
References <0e642403-36e9-4945-9efb-4d074d7d0eb2@s5g2000vbj.googlegroups.com> <mailman.311.1346945430.27098.python-list@python.org> <83536b03-64a5-4394-9d31-378b56f4fa27@x3g2000vbn.googlegroups.com> <CADwdpyZy4u2Nkt4h3s=aW+cxJjPb_sCwASWnP1QOd=vxw676sg@mail.gmail.com>
Newsgroups comp.lang.python
Message-ID <mailman.315.1346951874.27098.python-list@python.org> (permalink)

Show all headers | View raw


On 06/09/2012 17:58, Jerry Hill wrote:
> On Thu, Sep 6, 2012 at 12:46 PM, Helpful person <rrllff@yahoo.com> wrote:
>> The reference might help if I could get Python to recognize the dll as
>> a module.
>
> That's never going to happen.  It's a DLL, not a python module.  I
> think the documentation lays that out pretty explicitly.  Have you
> experimented with the very first bit of example code in the
> documentation?  What do you get if you do the following at the
> interactive interpreter?
>
>>>> from ctypes import *
>>>> print windll.<insert your dll name here, without the .dll extension>
>
Or this:

 >>> import ctypes
 >>> dll_path = ...
 >>> libc = ctypes.CDLL(dll_path)
 >>> dir(libc)

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Accessing dll Helpful person <rrllff@yahoo.com> - 2012-09-06 08:07 -0700
  Re: Accessing dll Jerry Hill <malaclypse2@gmail.com> - 2012-09-06 11:30 -0400
    Re: Accessing dll Helpful person <rrllff@yahoo.com> - 2012-09-06 08:41 -0700
    Re: Accessing dll Helpful person <rrllff@yahoo.com> - 2012-09-06 08:44 -0700
      Re: Accessing dll Chris Angelico <rosuav@gmail.com> - 2012-09-07 22:15 +1000
        Re: Accessing dll Helpful person <rrllff@yahoo.com> - 2012-09-07 10:27 -0700
          Re: Accessing dll Chris Angelico <rosuav@gmail.com> - 2012-09-08 21:21 +1000
    Re: Accessing dll Helpful person <rrllff@yahoo.com> - 2012-09-06 09:46 -0700
      Re: Accessing dll Jerry Hill <malaclypse2@gmail.com> - 2012-09-06 12:58 -0400
        Re: Accessing dll Helpful person <rrllff@yahoo.com> - 2012-09-06 10:10 -0700
      Re: Accessing dll MRAB <python@mrabarnett.plus.com> - 2012-09-06 18:17 +0100
  Re: Accessing dll Ulrich Eckhardt <ulrich.eckhardt@dominolaser.com> - 2012-09-06 17:28 +0200
  Re: Accessing dll Tim Williams <tjandacw@cox.net> - 2012-09-06 13:21 -0700
    Re: Accessing dll Tim Williams <tjandacw@cox.net> - 2012-09-06 13:27 -0700

csiph-web