Parsing chars from serial port

Laurent Pointal laurent.pointal at laposte.net
Sat Dec 1 17:16:51 EST 2001


[posted and mailed]

"Erik Myllymaki" <erik at pacific-shores.com> wrote in
news:5ZbO7.10943$%B6.3479393 at news2.rdc1.bc.home.com: 

> I am using the win32comport_demo as the basis for a serial port
> handler. 
> 
> It works well, but the even loop grabs input from the COM port
> character-by-character, and I need to pass a full line to my database.
> 
> I have fooled around with this all morning, but I feel like I am
> reinventing the whell.
> 
> Can anyone point to my solution?

Have you looked at USPP ?

There was an announce post (found back with google groups):

<<
De :Isaac Barona Martínez (ibarona at tid.es)
Objet :[Module] USPP (Universal Serial Port Python) Library v0.1 
Groupes de discussion :comp.lang.python.announce
Date :2001-09-14 09:01:01 PST 
 

USPP (Universal Serial Port Python) Library v0.1            
            ------------------------------------------------            

Multi-platform Python module to access serial ports

USPP Library is a multi-platform Python module to access serial ports.
At the moment, it only works in Windows and Linux (the platforms I have
access to) but as it is written entirely in Python I hope you can extend
it to support any other platforms.

The module has the following features:

- hight level access to serial port under several platforms. -
autodetects the platform in which it is working and exports the correct
classes for that platform. - object oriented approach. - file object
semantic operations over the ports. - allows using the serial port with
different speeds and characteristics. - RS-232 and RS-485 modes (now
only RS-232). In RS-485 mode the communication is half-duplex and uses
the RTS line to control the direction of the transference. - blocking,
non-blocking or configurable timeout reads.




       URL:  
http://balder.prohosting.com/ibarona/en/python/uspp/uspp_en.html
  Download:  http://balder.prohosting.com/ibarona/en/python/uspp/uspp-0_
1.tar.gz

   License:  GPL

  Categories:  Miscellany

Isaac Barona Martínez (ibarona at tid.es)
http://balder.prohosting.com/ibarona/
>>

Maybe it can help (at least you may look into the code).

A+

Laurent.




More information about the Python-list mailing list