Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > Sio serial module install problem with ActiveState

Reply
Thread Tools

Sio serial module install problem with ActiveState

 
 
Conrad
Guest
Posts: n/a
 
      07-14-2003
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_MACHINE\SOFTWARE\Python\PythonCore\2.2\ InstallPath

I am using ActiveStates Python 2.2.2 build 224 on Win98SE.

ActiveState apparently does do registry setup, for example,
the HKEY_USERS\.DEFAULT\SOFTWARE tree contains the
\Python\PythonCore\2.2\InstallPath 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

 
Reply With Quote
 
 
 
 
Peter Hansen
Guest
Posts: n/a
 
      07-14-2003
Conrad wrote:
>
> 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:


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
 
Reply With Quote
 
 
 
 
Conrad
Guest
Posts: n/a
 
      07-15-2003
Years ago, Nostradamus predicted that on Mon, 14 Jul 2003 19:33:23 -0400,
Peter Hansen would write, saying:

> Conrad wrote:
>>
>> 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:

>
> 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


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



 
Reply With Quote
 
Peter Hansen
Guest
Posts: n/a
 
      07-15-2003
Conrad wrote:
>
> 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


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.

> pyserial seemed from it's docs
> to require jython - which means pulling in a whole slew
> of third-party DLLs for Java.


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
 
Reply With Quote
 
Gary Richardson
Guest
Posts: n/a
 
      07-15-2003
[snip]

> 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
>


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


 
Reply With Quote
 
Chris Liechti
Guest
Posts: n/a
 
      07-15-2003
Peter Hansen <(E-Mail Removed)> wrote in
news:(E-Mail Removed):

> Conrad wrote:
>> pyserial seemed from it's docs
>> to require jython - which means pulling in a whole slew
>> of third-party DLLs for Java.

>
> No! Try PySerial first, for sure. It does NOT require
> Jython, but does support it. As the home page says,


thanks for defending pyserial
what you're saying is of course correct.

> "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.


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

chris
--
Chris <(E-Mail Removed)>

 
Reply With Quote
 
Peter Hansen
Guest
Posts: n/a
 
      07-15-2003
Gary Richardson wrote:
>
> [snip]
>
> > 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?


>
> 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.


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
 
Reply With Quote
 
Conrad
Guest
Posts: n/a
 
      07-15-2003

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:

> 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_MACHINE\SOFTWARE\Python\PythonCore\2.2\ InstallPath
>
> I am using ActiveStates Python 2.2.2 build 224 on Win98SE.
>
> ActiveState apparently does do registry setup, for example,
> the HKEY_USERS\.DEFAULT\SOFTWARE tree contains the
> \Python\PythonCore\2.2\InstallPath 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


 
Reply With Quote
 
yaipa h.
Guest
Posts: n/a
 
      07-15-2003
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 <(E-Mail Removed)> wrote in message news:<(E-Mail Removed)>...
> Conrad wrote:
> >
> > 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

>
> 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.
>
> > pyserial seemed from it's docs
> > to require jython - which means pulling in a whole slew
> > of third-party DLLs for Java.

>
> 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

 
Reply With Quote
 
Peter Hansen
Guest
Posts: n/a
 
      07-15-2003
"yaipa h." wrote:
>
> 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?


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
 
Reply With Quote
 
 
 
Reply

Thread Tools

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
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
install paramiko on AIX (ActiveState) loial Python 0 06-21-2007 10:19 AM
activestate perl via shell() on XP, module location problem doolittle Perl Misc 3 10-27-2006 07:47 PM
problem with ActiveState install Steve Python 1 07-26-2005 03:48 PM
Re: nc io sio iss i SAFEBOOT SOLO IS DISCONTINUED, FLAW DISCOVERED: CONTROL BREAK INTERNATIONAL is a Disreputable Company, DO NOT Patronize Them cn jkh ioshio io Computer Security 3 08-04-2004 11:28 AM
Problem using ActiveState PPM to install module Irwin Friedman Perl 1 09-06-2003 10:57 PM



Advertisments