Has anyone gotten pyparallel to work?

Brian ThisIsNotMyReal at ddress.com
Fri Sep 24 17:34:06 EDT 2004


When using this:

import parallel
p = parallel.Parallel()     #open LPT1
p.setData(0x55)



I get this:

Traceback (most recent call last):
  File "port2.py", line 2, in ?
    p = parallel.Parallel()     #open LPT1
  File "/usr/lib/python2.3/site-packages/parallel/parallelppdev.py", line 
175, in __init__
    self._fd = os.open(self.device, os.O_RDWR)

OSError: [Errno 19] No such device: '/dev/parport0'

Exception exceptions.AttributeError: "Parallel instance has no attribute 
'_fd'" in <bound method Parallel.__del__ of 
<parallel.parallelppdev.Parallel instance at 0x403d96ac>> ignored



Yet a program I wrote in C has no problem accessing or reading bits from 
LPT1.  /dev/parport0 exists and is chmoded to 666.  Is there some secret to 
getting pyparallel to work that I'm missing (besides brains)?



More information about the Python-list mailing list