Sio serial module install problem with ActiveState

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Conrad

    Sio serial module install problem with ActiveState

    Greetings,

    I have a need to print from Win98SE to a little
    serial label printer provided by United Parcel, so
    based on Mark Hammond's recommendation in
    'Programming on Win32' I decided to try the Sio
    module at http://starship.python.net/crew/roger/

    My problem:

    The Sio installer dies looking for:
    HKEY_LOCAL_MACH INE\SOFTWARE\Py thon\PythonCore \2.2\InstallPat h

    I am using ActiveStates Python 2.2.2 build 224 on Win98SE.

    ActiveState apparently does do registry setup, for example,
    the HKEY_USERS\.DEF AULT\SOFTWARE tree contains the
    \Python\PythonC ore\2.2\Install Path keys. I re-installed
    Python, thinking I had blown the registry, but the keys
    that Sio wants are never set.

    FWIW, PyPGSQL, wxPython, and the egenix MxBase packages all
    find Python on machines with ActiveState and install OK.
    I don't know what they are checking on install.

    Can anyone suggest a fix/workaround for someone who is just
    a bit befuddled by registries, or did I perhaps grab the
    wrong Sio? ( I got SioModule22.EXE at 171184 bytes from:
    http://starship.python.net/crew/roger/ )

    BTW, this serial printer is apparently pretty much a 'dump
    and go' type device - the only thing the printer seems to
    be capable of returning is a 4-byte error code after a special
    error report command is sent to the printer - other than that,
    all of the data and commands seem to move downstream only,
    with no return from the printer expected. Is Sio overkill for
    this, i.e. is there some incredibly simple "open a serial port
    under Win32 for write only" command I'm missing in the basic
    Python stuff?

    Many thanks,

    Conrad

  • Peter Hansen

    #2
    Re: Sio serial module install problem with ActiveState

    Conrad wrote:[color=blue]
    >
    > Greetings,
    >
    > I have a need to print from Win98SE to a little
    > serial label printer provided by United Parcel, so
    > based on Mark Hammond's recommendation in
    > 'Programming on Win32' I decided to try the Sio
    > module at http://starship.python.net/crew/roger/
    >
    > My problem:[/color]

    Solution to problem (of a sort): don't use SIO module,
    which relies on a third-party external DLL. Instead,
    use http://pyserial.sourceforge.net/ or, if that doesn't work use


    -Peter

    Comment

    • Conrad

      #3
      Re: Sio serial module install problem with ActiveState

      Years ago, Nostradamus predicted that on Mon, 14 Jul 2003 19:33:23 -0400,
      Peter Hansen would write, saying:
      [color=blue]
      > Conrad wrote:[color=green]
      >>
      >> Greetings,
      >>
      >> I have a need to print from Win98SE to a little
      >> serial label printer provided by United Parcel, so
      >> based on Mark Hammond's recommendation in
      >> 'Programming on Win32' I decided to try the Sio
      >> module at http://starship.python.net/crew/roger/
      >>
      >> My problem:[/color]
      >
      > Solution to problem (of a sort): don't use SIO module,
      > which relies on a third-party external DLL. Instead,
      > use http://pyserial.sourceforge.net/ or, if that doesn't work use
      > http://balder.prohosting.com/ibarona...p/uspp_en.html
      >
      > -Peter[/color]

      Thanks, Peter -

      I'll give them a shot tomorrow. USPP made me a little
      nervous, because frankly, it looks like it died a year
      and a half ago, with outstanding Linux bugs (eventually,
      my project will migrate to Linux), and a very conservative
      0.1 version label, and pyserial seemed from it's docs
      to require jython - which means pulling in a whole slew
      of third-party DLLs for Java. I'll give USPP a try first,
      because it's closest in spirit to what I want in terms of
      cross-compatibility and lack of dependencies - and after
      reflection, the fact that it hasn't changed in a while
      may just indicate the fact that RS-232 hardware has been
      much more static lately than, say, video hardware.

      Thanks again,

      Conrad



      Comment

      • Peter Hansen

        #4
        Re: Sio serial module install problem with ActiveState

        Conrad wrote:[color=blue]
        >
        > I'll give them a shot tomorrow. USPP made me a little
        > nervous, because frankly, it looks like it died a year
        > and a half ago, with outstanding Linux bugs[/color]

        Thanks for checking that out better than I did. I was
        worried about that myself, having seen nothing about it
        for a very long time, but the name had stuck in my head.
        [color=blue]
        > pyserial seemed from it's docs
        > to require jython - which means pulling in a whole slew
        > of third-party DLLs for Java.[/color]

        No! Try PySerial first, for sure. It does NOT require
        Jython, but does support it. As the home page says,
        "It provides backends for stadard (sic) Python running
        on Windows, Linux, BSD (possibly any POSIX compilant system)
        and Jython. The module named "serial" automaticaly (sic)
        selects the appropriate backed (sic)."

        (Chris, if you'd like, I'll happily proofread that page
        and correct a few spelling errors for you. ;-)

        -Peter

        Comment

        • Gary Richardson

          #5
          Re: Sio serial module install problem with ActiveState

          [snip]
          [color=blue]
          > BTW, this serial printer is apparently pretty much a 'dump
          > and go' type device - the only thing the printer seems to
          > be capable of returning is a 4-byte error code after a special
          > error report command is sent to the printer - other than that,
          > all of the data and commands seem to move downstream only,
          > with no return from the printer expected. Is Sio overkill for
          > this, i.e. is there some incredibly simple "open a serial port
          > under Win32 for write only" command I'm missing in the basic
          > Python stuff?
          >
          > Many thanks,
          >
          > Conrad
          >[/color]

          I've written a pretty simple serial I/O module that will do what you want.
          Email me directly if you would like a copy.

          Gary Richardson


          Comment

          • Chris Liechti

            #6
            Re: Sio serial module install problem with ActiveState

            Peter Hansen <peter@engcorp. com> wrote in
            news:3F13703C.C 12392D6@engcorp .com:
            [color=blue]
            > Conrad wrote:[color=green]
            >> pyserial seemed from it's docs
            >> to require jython - which means pulling in a whole slew
            >> of third-party DLLs for Java.[/color]
            >
            > No! Try PySerial first, for sure. It does NOT require
            > Jython, but does support it. As the home page says,[/color]

            thanks for defending pyserial :-)
            what you're saying is of course correct.
            [color=blue]
            > "It provides backends for stadard (sic) Python running
            > on Windows, Linux, BSD (possibly any POSIX compilant system)
            > and Jython. The module named "serial" automaticaly (sic)
            > selects the appropriate backed (sic)."
            >
            > (Chris, if you'd like, I'll happily proofread that page
            > and correct a few spelling errors for you. ;-)[/color]

            ok thanks, i fixed those and a few other details.

            chris
            --
            Chris <[email protected] et>

            Comment

            • Peter Hansen

              #7
              Re: Sio serial module install problem with ActiveState

              Gary Richardson wrote:[color=blue]
              >
              > [snip]
              >[color=green]
              > > BTW, this serial printer is apparently pretty much a 'dump
              > > and go' type device - the only thing the printer seems to
              > > be capable of returning is a 4-byte error code after a special
              > > error report command is sent to the printer - other than that,
              > > all of the data and commands seem to move downstream only,
              > > with no return from the printer expected. Is Sio overkill for
              > > this, i.e. is there some incredibly simple "open a serial port
              > > under Win32 for write only" command I'm missing in the basic
              > > Python stuff?[/color][/color]
              [color=blue]
              >
              > I've written a pretty simple serial I/O module that will do what you want.
              > Email me directly if you would like a copy.[/color]

              The benefit of the PySerial library is that it's cross-platform,
              available without emailing you, fully documented, and most
              important of all: if you find problems, you can fix them and
              everyone else benefits.

              Maybe you can contribute those parts of your own library which
              are better than PySerial to the PySerial project and we can avoid
              a proliferation of serial libraries in Python.

              Or put the file on a web page somewhere and we can all poke away
              at it, learn from it, and maybe incorporate the best parts into
              PySerial.

              -Peter

              Comment

              • Conrad

                #8
                Re: Sio serial module install problem with ActiveState


                OK, I'm posting on top, spank me. Many thanks to Peter
                and Gary for their help, and to Chris for writing
                pyserial, which is working just fine for what I'm
                doing - it took two lines to change my code, because
                I was already using file-type .write() methods to
                pump the data out - so I added an import, and changed
                my open statement, and it just worked. (once I killed
                the evil VB program that apparently opens the serial
                port and just hangs on to it forever!)

                Thanks again,

                Conrad


                Years ago, Nostradamus predicted that on Mon, 14 Jul 2003 22:38:57 +0000,
                Conrad would write, saying:
                [color=blue]
                > Greetings,
                >
                > I have a need to print from Win98SE to a little
                > serial label printer provided by United Parcel, so
                > based on Mark Hammond's recommendation in
                > 'Programming on Win32' I decided to try the Sio
                > module at http://starship.python.net/crew/roger/
                >
                > My problem:
                >
                > The Sio installer dies looking for:
                > HKEY_LOCAL_MACH INE\SOFTWARE\Py thon\PythonCore \2.2\InstallPat h
                >
                > I am using ActiveStates Python 2.2.2 build 224 on Win98SE.
                >
                > ActiveState apparently does do registry setup, for example,
                > the HKEY_USERS\.DEF AULT\SOFTWARE tree contains the
                > \Python\PythonC ore\2.2\Install Path keys. I re-installed
                > Python, thinking I had blown the registry, but the keys
                > that Sio wants are never set.
                >
                > FWIW, PyPGSQL, wxPython, and the egenix MxBase packages all
                > find Python on machines with ActiveState and install OK.
                > I don't know what they are checking on install.
                >
                > Can anyone suggest a fix/workaround for someone who is just
                > a bit befuddled by registries, or did I perhaps grab the
                > wrong Sio? ( I got SioModule22.EXE at 171184 bytes from:
                > http://starship.python.net/crew/roger/ )
                >
                > BTW, this serial printer is apparently pretty much a 'dump
                > and go' type device - the only thing the printer seems to
                > be capable of returning is a 4-byte error code after a special
                > error report command is sent to the printer - other than that,
                > all of the data and commands seem to move downstream only,
                > with no return from the printer expected. Is Sio overkill for
                > this, i.e. is there some incredibly simple "open a serial port
                > under Win32 for write only" command I'm missing in the basic
                > Python stuff?
                >
                > Many thanks,
                >
                > Conrad[/color]

                Comment

                • yaipa h.

                  #9
                  Re: Sio serial module install problem with ActiveState

                  All,

                  Worked like a charm for me too! I used it to develop an
                  automated attendant for a Serial Oven Controller. The
                  attendant ran from Sparc Solaris using Python 2.1 and pySerial.

                  The only weird thing, which I didn't get a chance to
                  debug, was a perfectly working script under RS-232
                  got terribly out of sync when R/W I/O to a RS-485
                  serial network. Any reason why that would be?

                  Thanks, just a bit of trivia if the boss wants me
                  to revisit it again.

                  --Alan

                  Peter Hansen <peter@engcorp. com> wrote in message news:<3F13703C. C12392D6@engcor p.com>...[color=blue]
                  > Conrad wrote:[color=green]
                  > >
                  > > I'll give them a shot tomorrow. USPP made me a little
                  > > nervous, because frankly, it looks like it died a year
                  > > and a half ago, with outstanding Linux bugs[/color]
                  >
                  > Thanks for checking that out better than I did. I was
                  > worried about that myself, having seen nothing about it
                  > for a very long time, but the name had stuck in my head.
                  >[color=green]
                  > > pyserial seemed from it's docs
                  > > to require jython - which means pulling in a whole slew
                  > > of third-party DLLs for Java.[/color]
                  >
                  > No! Try PySerial first, for sure. It does NOT require
                  > Jython, but does support it. As the home page says,
                  > "It provides backends for stadard (sic) Python running
                  > on Windows, Linux, BSD (possibly any POSIX compilant system)
                  > and Jython. The module named "serial" automaticaly (sic)
                  > selects the appropriate backed (sic)."
                  >
                  > (Chris, if you'd like, I'll happily proofread that page
                  > and correct a few spelling errors for you. ;-)
                  >
                  > -Peter[/color]

                  Comment

                  • Peter Hansen

                    #10
                    Re: Sio serial module install problem with ActiveState

                    "yaipa h." wrote:[color=blue]
                    >
                    > All,
                    >
                    > Worked like a charm for me too! I used it to develop an
                    > automated attendant for a Serial Oven Controller. The
                    > attendant ran from Sparc Solaris using Python 2.1 and pySerial.
                    >
                    > The only weird thing, which I didn't get a chance to
                    > debug, was a perfectly working script under RS-232
                    > got terribly out of sync when R/W I/O to a RS-485
                    > serial network. Any reason why that would be?[/color]

                    Well, one reason might be that RS232 is point-to-point, while
                    RS-485 is many-to-many, at least in principle. Was this a
                    bus network, or at least a "multidrop" situation with one master
                    and many slaves? There are no guarantees in those situations, unless
                    you've been very careful to ensure proper handshaking, timing,
                    and such.

                    If you want to discuss this, please define "out of sync" in more
                    detail... it could mean anything.

                    -Peter

                    Comment

                    • yaipa h.

                      #11
                      Re: Sio serial module install problem with ActiveState

                      Peter,

                      Thanks, basically one server feed many serial clients. From the sound
                      of your post I had better get "Serial Port Complete" before giving it
                      another run.

                      Thanks.

                      -Alan



                      Peter Hansen <peter@engcorp. com> wrote in message news:<3F146F57. 94A49564@engcor p.com>...[color=blue]
                      > "yaipa h." wrote:[color=green]
                      > >
                      > > All,
                      > >
                      > > Worked like a charm for me too! I used it to develop an
                      > > automated attendant for a Serial Oven Controller. The
                      > > attendant ran from Sparc Solaris using Python 2.1 and pySerial.
                      > >
                      > > The only weird thing, which I didn't get a chance to
                      > > debug, was a perfectly working script under RS-232
                      > > got terribly out of sync when R/W I/O to a RS-485
                      > > serial network. Any reason why that would be?[/color]
                      >
                      > Well, one reason might be that RS232 is point-to-point, while
                      > RS-485 is many-to-many, at least in principle. Was this a
                      > bus network, or at least a "multidrop" situation with one master
                      > and many slaves? There are no guarantees in those situations, unless
                      > you've been very careful to ensure proper handshaking, timing,
                      > and such.
                      >
                      > If you want to discuss this, please define "out of sync" in more
                      > detail... it could mean anything.
                      >
                      > -Peter[/color]

                      Comment

                      Working...