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


Groups > comp.lang.python > #28610

Re: Accessing dll

References <0e642403-36e9-4945-9efb-4d074d7d0eb2@s5g2000vbj.googlegroups.com>
Date 2012-09-06 11:30 -0400
Subject Re: Accessing dll
From Jerry Hill <malaclypse2@gmail.com>
Newsgroups comp.lang.python
Message-ID <mailman.311.1346945430.27098.python-list@python.org> (permalink)

Show all headers | View raw


On Thu, Sep 6, 2012 at 11:07 AM, Helpful person <rrllff@yahoo.com> wrote:
> I am a complete novice to Python.  I wish to access a dll that has
> been written to be compatible with C and VB6.  I have been told that
> after running Python I should enter  "from ctypes import *" which
> allows Python to recognize the dll structure.  I have placed the dll
> into my active directory (if that's the correct word, one on my path)
> for simplification.
>
> I tried:   "import name.dll" but this just gave me an error telling me
> that there was no such module.
>
> Can someone please help?

You should start by reading the ctypes documentation, here:
http://docs.python.org/library/ctypes.html .  It has a lot of examples
that ought to get you started.

When you run into more specific problems, you're going to have to
provide a lot more information before we can help you, including the
specific documentation of the DLL you're trying to wrap, your
platform, and python version.  If you are not permitted to share those
things, we may not be able to give you much help.  Ctypes is very
specific to the actual library you are accessing, and requires that
you understand the requirements of the underlying DLL.

-- 
Jerry

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