LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 08-04-2008, 01:43 AM   #1
MrGorby2u
LQ Newbie
 
Registered: Oct 2007
Location: Colorado
Distribution: Ubuntu 8.04
Posts: 10

Rep: Reputation: 0
Python pyparallel


After installing pyparallel on Ubuntu Hardy and running the following piece of code I get the permission denied error listed below.
Code:
Python 2.5.2 (r252:60911, Jul 31 2008, 17:28:52) 
[GCC 4.2.3 (Ubuntu 4.2.3-2ubuntu7)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import parallel
>>> p=parallel.Parallel()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python2.5/site-packages/parallel/parallelppdev.py", line 186, in __init__
    self._fd = os.open(self.device, os.O_RDWR)
OSError: [Errno 13] Permission denied: '/dev/parport0'
>>>
After some googling I came across the suggestion of:
Code:
rmmod lp
Does anyone know why this would work?
 
Old 08-05-2008, 04:07 PM   #2
mongoosecage
Member
 
Registered: Jun 2008
Distribution: Slackware 13.0, Ubuntu 9.10, Windows XP Pro SP3
Posts: 100

Rep: Reputation: 15
little guess

well... just trying... rm means remove, mod is the module... lp is a module so basically
you must be saying:

remove the lp module... I found it quite related to virtualization like vmware... you got something with parallels...any connection?
 
Old 08-07-2008, 12:32 AM   #3
MrGorby2u
LQ Newbie
 
Registered: Oct 2007
Location: Colorado
Distribution: Ubuntu 8.04
Posts: 10

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by mongoosecage View Post
well... just trying... rm means remove, mod is the module... lp is a module so basically
you must be saying:

remove the lp module... I found it quite related to virtualization like vmware... you got something with parallels...any connection?
Yep, I knew it removed the module from the kernel. I guess what I was more interested in is why the parallel port is NON accessible while the lp module is installed? I'm guessing the lp module takes control of the port?
 
Old 08-18-2008, 03:35 PM   #4
MrGorby2u
LQ Newbie
 
Registered: Oct 2007
Location: Colorado
Distribution: Ubuntu 8.04
Posts: 10

Original Poster
Rep: Reputation: 0
So running the command rmmod lp does open the parallel port, but only for root. Does anyone know how to allow other users to also have access?
 
Old 08-19-2008, 05:09 AM   #5
mongoosecage
Member
 
Registered: Jun 2008
Distribution: Slackware 13.0, Ubuntu 9.10, Windows XP Pro SP3
Posts: 100

Rep: Reputation: 15
Quote:
Originally Posted by MrGorby2u View Post
So running the command rmmod lp does open the parallel port, but only for root. Does anyone know how to allow other users to also have access?
hmm... I honestly have no clue about this... but just for the sake of it could you tell me what you are doing? making a python program of some sort?
 
Old 08-19-2008, 06:30 AM   #6
Agrouf
Senior Member
 
Registered: Sep 2005
Location: France
Distribution: LFS
Posts: 1,596

Rep: Reputation: 80
What about chmod g+rw /dev/parport0 and make sure you are in the group whose parport0 belongs to?
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Processing Conflict: python-devel conflicts python< 2.3.4-13.1 guarriman Fedora 2 04-23-2009 07:02 PM
LXer: Charming Python: Python elegance and warts, Part 2 LXer Syndicated Linux News 0 08-31-2007 08:40 AM
python, os.system() function. howto use python variables? jhwilliams Programming 5 07-28-2007 01:56 AM
LXer: Move to python 2.4 / Changing the packaging style for python packages LXer Syndicated Linux News 0 06-13-2006 07:54 PM
python problem - compiled from source - python -V still showing old version txm123 Linux - Newbie 1 02-15-2006 11:05 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 12:16 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration