Serial Port communication

Grant Edwards ge at nowhere.none
Fri Sep 15 14:49:20 EDT 2000


In article <8pteu9$g4f at news.or.intel.com>, Brian Geddes wrote:

>I'm working in Linux (Redhat) on a 64-bit Intel system.  

Cool. At first I thought you must be a newbie who doesn't know
what's inside his own computer -- then I noticed your e-mail
address.  :)

>I don't know whether serial port stuff has been enabled yet for
>this environment.  If you know how Python deals with serial
>ports on other Linux environments, that would at least give me
>a path to look down.

Under Unix, serial I/O is generally done using the modules that
wrap the standard Posix termios interface.  If you know how to
do what you want in C, then just take a look at the TERMIOS,
termios, and os or posix modules.  Note that you need to use
the termios stuff with file descriptors as returned by
os.open(), and not with Python file objects as returned by the
built-in open().

Under Win32, there's a serial-IO module that impliments
serial-port objects in a completely different manner.

I don't know about MacOS, VMS, etc.

-- 
Grant Edwards                   grante             Yow!  I'm pretending I'm
                                  at               pulling in a TROUT! Am I
                               visi.com            doing it correctly??



More information about the Python-list mailing list