python and parrallele port !
jkndeja at my-deja.com
jkndeja at my-deja.com
Thu Jan 25 10:12:27 EST 2001
As posted previously, I have done some work on a C extension module to
_directly_ controlling an LPT port (ie. setting the port pins Hi and
Low), if that's what you want.
The eventual aim is to have a class definition, but at the moment it
works something like this:
import directlpt
in = directlpt.inb(0x378) # read from I/O address 0x378
directlpt.outb(0x379, 0xaa) # write 0xaa to I/O address 0x379
The good news: the module compiles and runs under (80x86)Linux _and_
Windows (95, 98, ME I believe - Not NT or W2000).
This is work under progress - see a download file at
http://www.nicorp.f9.co.uk/download/python-ioport.zip
for an older version. And let me know if this is what you're after, I
have more recent versions which I haven't updated yet. Knowing that
people find it of interest helps ;-)
I also ought to point out that the Vaults of Parnassus archive points
to something very similar, which compiles under Linux only. Do a search
for 'ioport', IIRC.
jon N
Sent via Deja.com
http://www.deja.com/
More information about the Python-list
mailing list