0

I've been trying to access the parallel port with pyParallel, which is in the same sourceforge as PySerial:

http://sourceforge.net/projects/pyserial/files/

I'm getting a WidowsError: exception: priviledged instruciton. Has anyone used this module before?

import parallel 
p = parallel.Parallel()
Traceback (most recent call last):
  File "<interactive input>", line 1, in <module>
  File "C:\Python26\lib\site-packages\parallel\parallelwin32.py", line 74, in __init__
    self.ctrlReg = _pyparallel.inp(self.ctrlRegAdr)
WindowsError: exception: priviledged instruction
2
  • stackoverflow.com/questions/89607/… Commented May 31, 2010 at 17:54
  • I used it a very, very long time ago, on some already-old-at-the-time OS, maybe Win'98. What version of Windows are you using? Recent versions have been tightening security down for many years now (and no bad thing either;-), which might explain the problem (though not necessarily suggest a solution... if your version of Windows just won't let a user-mode program perform an input operation from a parallel port's control register, it's far from obvious how you can achieve that goal). Commented May 31, 2010 at 17:57

2 Answers 2

1

Yep -- as I pondered in my comment, it's all about better sandboxing in today's Windows versions -- there's a discussion here. There's also a possible solution here (at least up to XP, you'll need to try it if you have a newer Windows version) with a Python example here. I can't try it out since I don't have any Windows around, but I hope it can help!

Sign up to request clarification or add additional context in comments.

2 Comments

thanks for the links and answer. Looks like this will be a little harder than pySerial. The idea was to use just one or two pins of the parallel port (and ground) to read in an input and signal an Adruino board. Hopefully input32.dll will be a useable solution. Thanks!
@PPTim, you're welcome -- fingers crossed and wishing you best of luck!
0

I had no luck with the accepted answer.

However, this installer solved the problem for me in one shot, no fiddling with drivers:

http://sourceforge.net/projects/pyserial/files/pyparallel/giveio/

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.