[Tutor] Calling external DLLs from Python

dman dman@dman.ddts.net
Fri, 10 May 2002 23:59:09 -0500


--4bRzO86E/ozDv8r1
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Fri, May 10, 2002 at 03:33:26PM -0600, Colin Campbell wrote:
| I've written a bit of Python to convert a LDIF file into Eudora's address=
=20
| book format (the company uses Netscape, which I find too unstable, and ou=
r=20
| IT staff are forgiving about my rebel tendencies).
|=20
| I've got the routine running reasonably well, using PythonWin so that I c=
an=20
| browse for source and output files, but I would like to be able to read a=
=20
| .NA2 file directly. I think I need to be able to call NABAPI.dll from=20
| inside Python, but I need some kind soul to tell me whether this is even=
=20
| possible, and then second to point me in the direction of some=20
| documentation/sample source code/newsgroup archive. I've got the Address=
=20
| Book API from=20
| http://developer.netscape.com/docs/manuals/communicator/addrapi.htm and=
=20
| just need a pointer to the next step.

I've only briefly looked over that document, and it won't be simple to
use the library.  If they had a COM interface it would be, but ...

It will require
    o   getting the header files (C++)
    o   getting a win32 C++ compiler
    o   getting the header files for python
    o   writing C/C++ code to provide a python wrapper for the
        library's interface

Once you've done that you can use your shiny new PyNABAPI module from
python to pilot that library.

-D

--=20

One man gives freely, yet gains even more;
another withholds unduly, but comes to poverty.
        Proverbs 11:24
=20
GnuPG key : http://dman.ddts.net/~dman/public_key.gpg


--4bRzO86E/ozDv8r1
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iEYEARECAAYFAjzcpR0ACgkQO8l8XBKTpRSSqQCeIRnbOKQZnbwg2KUR148mgWFG
KtIAnRJkncPCLqRMSrb/9vRywcLyWLC5
=lWXb
-----END PGP SIGNATURE-----

--4bRzO86E/ozDv8r1--