accessing serial/parallel port from Python
James J. Besemer
jb at cascade-sys.com
Wed May 15 16:14:43 EDT 2002
Yes. You simply open them like any other "file". ioctl functions work
too, e.g., to send break on a serial line.
TTY = "/dev/ttyS1"
ttyi = open( TTY, "rb" )
ttyo = open( TTY, "wb" )
...
--jb
Les Smithson wrote:
> >>>>> "Nick" == Nick Evans <nick at huff.org.uk> writes:
>
> Nick> Hello group, Could anyone tell me if it is possable to
> Nick> access the Physical ports of a computer from python. I have
> Nick> a few electronic projects that i originally wrote programes
> Nick> in QBasic to access them, but i would like to start using
> Nick> python.
>
> Nick> Cheers in advance Nick Evans
>
> For Linux //el ports, try my ioport package -
> http://www.hare.demon.co.uk/ioport/ioport.html.
>
> For multi-platform serial I/O, pySerial is good -
> http://pyserial.sourceforge.net.
> --
> http://mail.python.org/mailman/listinfo/python-list
--
James J. Besemer 503-280-0838 voice
http://cascade-sys.com 503-280-0375 fax
mailto:jb at cascade-sys.com
More information about the Python-list
mailing list