win extension supports RS232 binary

Chris Liechti cliechti at gmx.net
Fri Feb 15 22:51:39 EST 2002


"Spencer Doidge" <spencer at spencerdoidge.com> wrote in
news:a4kc8e$ei5$1 at news.efn.org: 
> Starting with Isaac Barona's SerialPort extension built on the win32
> extensions, I have a receiver working now on binary data. The 
> original SerialPort handles ASCII, and you can use strlen() to 
> determine the number of bytes received.

my serial lib: http://pyserial.sourceforge.net does binary too (and it 
runs on win32, linux, jython). i had the same problems with some 
modules that only were suitable for ASCII so i made up my own lib (and 
license issues too).

> My update on Barona's module returns a tuple giving the number of 
> bytes received and a list containing those bytes.

transfering binary data in strings is more common in python. that's 
the way it works with files, sockets, struct, zipfile and many (most?) 
other things that deal with such data.

the file-like api that is more useful because you can then just switch 
sources from serial to socket to file etc. e.g. for debugging or 
extended functionality.

> In the spirit of the GNU license agreement, this source is up for
> grabs, and here and now is where I notify any interested parties 
> about that. I would be glad to email the script to anyone 
> interested. Later, when I have things polished up a bit, I suppose I 
> could post it at my web site, but I'm not sure how useful that would 
> be without periodic announcements that they are there.

> You probably have figured out that I'm a newbie at this open source
> stuff. Any suggestions about how to handle this sort of thing?

having a download on some page is good for many things. just get some 
references to your page so that google does index it and others can 
find it. 

chris

-- 
Chris <cliechti at gmx.net>




More information about the Python-list mailing list