Accessing a Parallel Port

This is the place for queries that don't fit in any of the other categories.

Accessing a Parallel Port

Postby kkanekal » Wed May 15, 2013 11:25 pm

Hey everyone!

I am trying to run this script that is meant to interact with a device through the parallel port in my computer (Running 64 bit Windows 7). When I tried using pyparallel as shown below:
Code: Select all
import parallel
p=parallel.Parallel()


I get this error:

Code: Select all
Traceback (most recent call last):
  File "C:\Python27\Scripts\SFL.py", line 7, in <module>
    p=parallel.Parallel()
  File "C:\Python27\lib\site-packages\parallel\parallelwin32.py", line 74, in __init__
    self.ctrlReg = _pyparallel.inp(self.ctrlRegAdr)
WindowsError: exception: priviledged instruction


I'm pretty sure this means that as a user, I don't have the permissions to specify inputs and outputs to and from the parallel port. Is this correct? If so, is there a fix?

Any help would be GREATLY APPRECIATED as I am a programming noob.
Last edited by stranac on Thu May 16, 2013 4:35 am, edited 1 time in total.
Reason: Added code tags
kkanekal
 
Posts: 2
Joined: Wed May 15, 2013 11:06 pm

Re: Accessing a Parallel Port

Postby micseydel » Thu May 16, 2013 6:11 am

"parallel" isn't a built-in module, so elaborating on where you got it would certainly help us to help you.

From what you posted, it looks like you just need admin access on the machine you're running it on. Is it your own computer? Does Windows 7 prompt you about giving it permission?
Join the #python-forum IRC channel on irc.freenode.net!

Please do not PM members regarding questions which are meant to be discussed publicly. The point of the forum is so that others can benefit from it. We don't want to help you over PMs or emails.
User avatar
micseydel
 
Posts: 1301
Joined: Tue Feb 12, 2013 2:18 am
Location: Mountain View, CA

Re: Accessing a Parallel Port

Postby kkanekal » Sun May 19, 2013 2:37 am

Thanks for the response! Unfortunately, I ran the code as the administrator and it still returned the same error =/.

Here's the website where I obtained the module.

http://pyserial.sourceforge.net/pyparallel.html

Again, any help would be greatly appreciated!
kkanekal
 
Posts: 2
Joined: Wed May 15, 2013 11:06 pm

Re: Accessing a Parallel Port

Postby micseydel » Sun May 19, 2013 2:42 am

If I were you, I'd try contacting the developers of the module. It could be something wrong on their end.
Join the #python-forum IRC channel on irc.freenode.net!

Please do not PM members regarding questions which are meant to be discussed publicly. The point of the forum is so that others can benefit from it. We don't want to help you over PMs or emails.
User avatar
micseydel
 
Posts: 1301
Joined: Tue Feb 12, 2013 2:18 am
Location: Mountain View, CA


Return to General Coding Help

Who is online

Users browsing this forum: No registered users and 4 guests