473,659 Members | 2,690 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

Jul 18 '05 #1
10 2647
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
Jul 18 '05 #2
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

Jul 18 '05 #3
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
Jul 18 '05 #4
[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
Jul 18 '05 #5
Peter Hansen <pe***@engcorp. com> wrote in
news:3F******** *******@engcorp .com:
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 <cl******@gmx.n et>

Jul 18 '05 #6
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
Jul 18 '05 #7

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


Jul 18 '05 #8
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 <pe***@engcorp. com> wrote in message news:<3F******* ********@engcor p.com>...
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

Jul 18 '05 #9
"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
Jul 18 '05 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

21
43023
by: Gavin | last post by:
Hi, I'm a newbie to programming of any kind. I have posted this to other groups in a hope to get a response from anyone. Can any one tell me how to make my VB program read the Bios serial number (or would HDD be better, or both?) and put that info into VB prog so the program won't work on another computer. My program uses an MSAccess table. Much appreciated if you can help! Thanks
16
10081
by: Jeff Wagner | last post by:
Is there a Python module or method that can convert between numeric bases? Specifically, I need to convert between Hex, Decimal and Binary such as 5Ah = 90d = 01011010b. I searched many places but couldn't find a Python specific one. Thanks, Jeff
0
1003
by: Craig Edgmon | last post by:
I am running ActiveState Python-2.3 and I am told that it does not have the module. I am directed to SourceForge, it wants to install in python1.5 on my Fedora environment. I get weird errors after that about a difference between the module and the version of python. Does anyone have an idea about how I can get this connection to work?
1
3504
by: Irwin Friedman | last post by:
I'm a newbie and can't find any clues in the FAQ's I've searched through. I'm trying to use ActiveState Perl PPM to install a module (DBI) but I can't get very far. I get the following results: C:\Perl>ppm PPM - Programmer's Package Manager version 3.1. Copyright (c) 2001 ActiveState SRL. All Rights Reserved. Entering interactive shell. Using Term::ReadLine::Stub as readline library.
1
1441
by: Steve | last post by:
I've installed the ActiveState binary distribution for Solaris in my home directory, but I'm having problems with Tk. I think I did everything right -- I used gtar rather than Solaris tar, and the install process indicated it was successful. I added the python directory to ~/.bashrc. Python works fine from the command line. But if I try to execute anything that uses Tkinter (including Idle),
4
11736
by: rowan | last post by:
I'm writing a driver in Python for an old fashioned piece of serial equipment. Currently I'm using the USPP serial module. From what I can see all the serial modules seem to set the timeout when you open a serial port. This is not what I want to do. I need to change the timeout each time I do a "read" on the serial port, depending on which part of the protocol I've got to. Sometimes a return character is expected within half a second,...
1
5525
by: srikantvm | last post by:
Hi All, I am using perl, v5.8.8 built for MSWin32-x86-multi-thread and i tried installing the DBD-Oracle module but unable to install. Please find below the steps followed by me: 1) I first tried installing Oracle.pm using the Activestate PPM but, i got an connection error to the activestate perl module repository. 2) Then i tried changing the http_proxy, it seemed to work fine. I was able to connect to the activestate perl module...
1
5715
by: vijayarl | last post by:
Hi Everyone, Am trying to install Padwalker module manually.As soon as i give then cmd nmake it gives this output C:\CPAN Modules>cd PadWalker-1.5 C:\CPAN Modules\PadWalker-1.5>perl Makefile.pl Writing Makefile for PadWalker C:\CPAN Modules\PadWalker-1.5>nmake
2
6379
by: somsub | last post by:
Hi all, Here is my samle code use strict ; use warnings ; use IO::Uncompress::Unzip ; When I compiled this three lines of code in win32 I got error like below.
0
8332
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8851
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8746
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8627
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7356
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6179
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4335
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2750
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1975
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.