Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #19791 > unrolled thread

newbie socket help

Started byloial <jldunn2000@gmail.com>
First post2012-02-02 05:53 -0800
Last post2012-02-07 12:44 -0500
Articles 4 — 2 participants

Back to article view | Back to comp.lang.python


Contents

  newbie socket help loial <jldunn2000@gmail.com> - 2012-02-02 05:53 -0800
    Re: newbie socket help Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2012-02-02 11:34 -0500
      Re: newbie socket help loial <jldunn2000@gmail.com> - 2012-02-06 01:23 -0800
        Re: newbie socket help Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2012-02-07 12:44 -0500

#19791 — newbie socket help

Fromloial <jldunn2000@gmail.com>
Date2012-02-02 05:53 -0800
Subjectnewbie socket help
Message-ID<4e70f47b-89e4-46bb-929e-9b7db20e7bcc@l16g2000vbl.googlegroups.com>
I am trying to write a python script to read data from a printer port
using python sockets, but it seems I am locking up the port.

Is there a way to ensure that I do not block the port to other
applications?

My knowledge of python sockets is minimal, so any help would be
appreciated.

[toc] | [next] | [standalone]


#19800

FromDennis Lee Bieber <wlfraed@ix.netcom.com>
Date2012-02-02 11:34 -0500
Message-ID<mailman.5364.1328200505.27778.python-list@python.org>
In reply to#19791
On Thu, 2 Feb 2012 05:53:22 -0800 (PST), loial <jldunn2000@gmail.com>
wrote:

>I am trying to write a python script to read data from a printer port
>using python sockets, but it seems I am locking up the port.
>
>Is there a way to ensure that I do not block the port to other
>applications?
>
>My knowledge of python sockets is minimal, so any help would be
>appreciated.

	OS and Python version might be of interest...

	However, parallel ports are typically unshared devices (which is why
any multitasking system has things like print spooling -- so multiple
tasks and "print" to the spool, and the spool driver is the only process
actually accessing the printer port).

	I still have nightmares over one assignment I had some 8 years ago:
Reading a clock signal (square wave) on one of the parallel port's
signal pins, in order to time a three-bit /balanced/ (using 6-pins of
the output) data stream. Done on a W98 laptop (since W98 didn't have the
protected ports of WinXP) using Visual C++  -- and on the laptop as the
eventual plan had been to send "red" GPS decryption keys to satellites;
contact with "red" keys makes the hardware it passes through highly
classified, and the main hardware had to stay "open" for uncleared
developers working on flight software.

	Unfortunately, even with the program running at the highest
available Windows priority, the OS still did <something> every few
milliseconds, which led to glitches in the output stream. (The good
news: by the time the DTD with the keys became available, the CONOPS had
changed to use "black" keys, which did not "infect" the computer system
-- so the regular command formatter could be used for uploading).

-- 
	Wulfraed                 Dennis Lee Bieber         AF6VN
        wlfraed@ix.netcom.com    HTTP://wlfraed.home.netcom.com/

[toc] | [prev] | [next] | [standalone]


#19938

Fromloial <jldunn2000@gmail.com>
Date2012-02-06 01:23 -0800
Message-ID<5563be07-e64f-497e-81a4-23bd3cb0eda5@bs8g2000vbb.googlegroups.com>
In reply to#19800
OS is Red hat enterprise linux 5.5 and python version is 2.6



On Feb 2, 4:34 pm, Dennis Lee Bieber <wlfr...@ix.netcom.com> wrote:
> On Thu, 2 Feb 2012 05:53:22 -0800 (PST), loial <jldunn2...@gmail.com>
> wrote:
>
> >I am trying to write a python script to read data from a printer port
> >using python sockets, but it seems I am locking up the port.
>
> >Is there a way to ensure that I do not block the port to other
> >applications?
>
> >My knowledge of python sockets is minimal, so any help would be
> >appreciated.
>
>         OS and Python version might be of interest...
>
>         However, parallel ports are typically unshared devices (which is why
> any multitasking system has things like print spooling -- so multiple
> tasks and "print" to the spool, and the spool driver is the only process
> actually accessing the printer port).
>
>         I still have nightmares over one assignment I had some 8 years ago:
> Reading a clock signal (square wave) on one of the parallel port's
> signal pins, in order to time a three-bit /balanced/ (using 6-pins of
> the output) data stream. Done on a W98 laptop (since W98 didn't have the
> protected ports of WinXP) using Visual C++  -- and on the laptop as the
> eventual plan had been to send "red" GPS decryption keys to satellites;
> contact with "red" keys makes the hardware it passes through highly
> classified, and the main hardware had to stay "open" for uncleared
> developers working on flight software.
>
>         Unfortunately, even with the program running at the highest
> available Windows priority, the OS still did <something> every few
> milliseconds, which led to glitches in the output stream. (The good
> news: by the time the DTD with the keys became available, the CONOPS had
> changed to use "black" keys, which did not "infect" the computer system
> -- so the regular command formatter could be used for uploading).
>
> --
>         Wulfraed                 Dennis Lee Bieber         AF6VN
>         wlfr...@ix.netcom.com    HTTP://wlfraed.home.netcom.com/

[toc] | [prev] | [next] | [standalone]


#19970

FromDennis Lee Bieber <wlfraed@ix.netcom.com>
Date2012-02-07 12:44 -0500
Message-ID<mailman.5507.1328637307.27778.python-list@python.org>
In reply to#19938
On Mon, 6 Feb 2012 01:23:41 -0800 (PST), loial <jldunn2000@gmail.com>
wrote:

>OS is Red hat enterprise linux 5.5 and python version is 2.6
>
	Okay, outside my documentation range...

	Don't see anything on Google for Linux parallel port & sockets.

	Low-level access is covered at:
http://as6edriver.sourceforge.net/Parallel-Port-Programming-HOWTO/parallel-port-programming-howto.html

http://bigasterisk.com/projects/parallel mentions a Python wrapper to a
C program that uses low-level access to the port (and such access
needing root privileges)
-- 
	Wulfraed                 Dennis Lee Bieber         AF6VN
        wlfraed@ix.netcom.com    HTTP://wlfraed.home.netcom.com/

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web