<p><br>
On Sep 6, 2012 8:15 AM, "Helpful person" <<a href="mailto:rrllff@yahoo.com">rrllff@yahoo.com</a>> wrote:<br>
><br>
> I am a complete novice to Python.  I wish to access a dll that has<br>
> been written to be compatible with C and VB6.  I have been told that<br>
> after running Python I should enter  "from ctypes import *" which<br>
> allows Python to recognize the dll structure.  I have placed the dll<br>
> into my active directory (if that's the correct word, one on my path)<br>
> for simplification.<br>
><br>
> I tried:   "import name.dll" but this just gave me an error telling me<br>
> that there was no such module.<br>
><br>
> Can someone please help?<br>
><br>
> Richard<br>
> --</p>
<p>Two things:</p>
<p>1) you would never use import name.dll, just like you don't use "import math.py" you would just import name. But that only works for Python libraries, which brings us to number 2</p>
<p>2) importing ctypes doesn't work any magic. Your c library is still a c library, not a python library. Ctypes provides functions to let you load a dll and makes calls to it, but you can't interact with the dll like python code. Doing that takes a lot more work.<br>

</p>