Parallel port programming on windows XP/2000?

c d saunter christopher.saunter at durham.ac.uk
Wed Aug 3 13:33:54 EDT 2005


Novice Experl (ex at pe.rl) wrote:
: I'd like to write a simple application that interfaces with the parallel port, and changes the data on it according to keyboard input. I hope I can get it to run under windows xp and / or windows 2000.

: How can I do this? What do I need to know? It doesn't look like the standard library (the one under my pillow) has that feature. In addition, I've heard that with newer versions of windows don't let you communicate with the port directly, instead requiring interfacing with some driver?

I always use DLPortIO, makes life almost as simple as GWBasic and a DOS 
box...  You can either create a custom extension around this or use 
ctypes.  Generally speaking a custom .dll is only needed if you are your 
lpt transactions are bidirectional, highly interleaved and high bandwidth.

DLPortIO: http://www.driverlinx.com/DownLoad/DlPortIO.htm
ctypes: http://starship.python.net/crew/theller/ctypes/

Note that DLPortIO is not a Python thing, it's a generic Windows .dll with 
C and VB examples, and needs installing, so it can't be packaged with 
py2exe.  I'd guess this is the same for other parallel port accesing 
tools - I think you need admin privilidges on a Windows NT/2K/XP box to 
install  DLPortIO, but not to use it.  

If you decide this is the best route for you and find yourself stuck, drop 
me an email for some example code.

---

cds

: I came across this:
: http://pyserial.sourceforge.net/pyparallel.html
: but it seems to only be used for direct access (would it work with XP?), and hasn't been updated for a couple of years. In addition, it requires something called  "Java Communications" (JavaComm) extension for Java/Jython, doesn't provide a link to it, and when I google it - google returns the page I came from!

: To add to the confusion, I hope I can provide a py2exe executable of my script instead of forcing a complete installation.


: --------------=  Posted using GrabIt  =----------------
: ------=  Binary Usenet downloading made easy =---------
: -=  Get GrabIt for free from http://www.shemes.com/  =-




More information about the Python-list mailing list