Access to _inp()/_outp() on Win95?

David Fisher python at rose164.wuh.wustl.edu
Fri Mar 3 05:55:00 EST 2000


After I wrote the first message I got to thinking, if you have SWIG, this is
even easier.  So, version 2.
This implements the exact same module as the first one, but as you can see,
you don't need to do anything with the Python/C api.  Two steps (after SWIG
is installed):

swig coniomodule.i

will make the c file coniomodule_wrap.c (and coniomodule_wrap.doc but that's
not relevant).  Now your Setup.in file should be one line:

conio coniomodule_wrap.c

Then run the compile.py script (by David Ascher, typo in the first message)
to create the project files (this will also include the swig step in the
project file, so you can rebuild in one step, cool huh?).

If you knew all of this already, feel free to ignore me (and use the code
<wink>).  I needed to brush up on my extension coding, and somebody else
might find this interesting.

David

----- Original Message -----
From: "Andrew Sterian" <steriana at gvsu.edu>
Newsgroups: comp.lang.python
To: <python-list at python.org>
Sent: Thursday, March 02, 2000 10:07 PM
Subject: Access to _inp()/_outp() on Win95?


> Has anyone exposed the _inp() and _outp() functions under Win95/98
> in an extension module? I need to access some I/O ports directly and
> was hoping to not reinvent the wheel.
>
> Thanks,
>
> --
> Andrew Sterian                 | <mailto:steriana at gvsu.edu>
> Assistant Professor            |
<http://claymore.engineer.gvsu.edu/~steriana>
> Padnos School of Engineering   | (616) 771-6756
> Grand Valley State University  |
>
>
> --
> http://www.python.org/mailman/listinfo/python-list
-------------- next part --------------
A non-text attachment was scrubbed...
Name: coniomodule.i
Type: application/octet-stream
Size: 131 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/python-list/attachments/20000303/7f837c5d/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: coniomodule.c
Type: application/octet-stream
Size: 192 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/python-list/attachments/20000303/7f837c5d/attachment-0001.obj>


More information about the Python-list mailing list