How do I ...

Erno Kuusela erno at iki.fi
Tue Mar 14 02:26:02 EST 2000


>>>>> "Cesar" == Cesar Lopez <clopez at abo.fi> writes:

    Cesar> How do I acces to the low-level of my system? I mean, for
    Cesar> example, I want to access and configure the speed of my
    Cesar> serial port using a Python program.

It depends on your platform, as the std python distribution doesn't
have platform specific serial io modules and accessing serial ports is
not defined by C.

If you happen to be using a unixish system, just opening
the serial port os.open() and using the termios module or stty(1)
should work.

    Cesar> I've tried building an extension C function and the call it
    Cesar> from Python, but doesn´t works.

You are doing it wrong then :) If you tell us how it fails to
work, people may be able to help.

 -- erno

PS. This is in the FAQ. You should look in there before posting,
so the newsgroup/mailing list doesn't get fooded with
repeated questions on the same topic.



More information about the Python-list mailing list