parallel port access?

Peter Hansen peter at engcorp.com
Thu Dec 7 17:56:56 CET 2000


Jochen Küpper wrote:
> 
> Well, on many unices there is the common idea of a printer beeing a
> file:-) This means you have a driver sitting behind it, and simply
> writing to that file sends your data to the port.
> Direct access to the ports in general requires kernel-level priorities
> or root-access and going through ioperm or such...
> 
> So I would say you'll need a generic wrapper function for sending data
> to the OS, that's it. On Unix I'd say all the problem reduces to find
> out wether there is a printer-file and what it is called.

I'm guessing that many of the people interested in this kind of thing
(direct control of parallel port) want to use it to directly twiddle the
bits, in order to gain quick-n-dirty control of some external
equipment.  I doubt treating the parallel port as a file would provide
the necessary control other than maybe leaving the data bits set to the
last bit pattern written.  The handshake lines would be hopeless, and
bidirectional control (reading individual bits) would likely be lost as
well.



More information about the Python-list mailing list