newbie socket help

Discussion in 'Python' started by loial, Feb 2, 2012.

  1. loial

    loial Guest

    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.
    loial, Feb 2, 2012
    #1
    1. Advertising

  2. On Thu, 2 Feb 2012 05:53:22 -0800 (PST), loial <>
    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
    HTTP://wlfraed.home.netcom.com/
    Dennis Lee Bieber, Feb 2, 2012
    #2
    1. Advertising

  3. loial

    loial Guest

    OS is Red hat enterprise linux 5.5 and python version is 2.6



    On Feb 2, 4:34 pm, Dennis Lee Bieber <> wrote:
    > On Thu, 2 Feb 2012 05:53:22 -0800 (PST), loial <>
    > 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
    >            HTTP://wlfraed.home.netcom.com/
    loial, Feb 6, 2012
    #3
  4. On Mon, 6 Feb 2012 01:23:41 -0800 (PST), loial <>
    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/P...ng-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
    HTTP://wlfraed.home.netcom.com/
    Dennis Lee Bieber, Feb 7, 2012
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Laszlo Nagy
    Replies:
    1
    Views:
    4,810
    Mark Wooding
    Jan 27, 2009
  2. Jean-Paul Calderone
    Replies:
    0
    Views:
    961
    Jean-Paul Calderone
    Jan 27, 2009
  3. Laszlo Nagy
    Replies:
    0
    Views:
    542
    Laszlo Nagy
    Feb 1, 2009
  4. Steve Holden
    Replies:
    0
    Views:
    657
    Steve Holden
    Feb 1, 2009
  5. Steve Holden
    Replies:
    1
    Views:
    714
Loading...

Share This Page