471,351 Members | 1,535 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,351 software developers and data experts.

Configuring the serial port

Hello all, I am working with Python over Linux since some months ago,
and Im not still very experienced with all this.

I would like to configure the serial port using Python. In order to do
this, I know there are some functions under termios module which allow
me to do it (i.e. termios.tcgetath(fd)), but I dont know how to get
the file descriptor to this 'special' file.

I have tried to get the fd using open('/dev/ttyS1','r') but it doesnt
work out.

Do you know if I am in the right way to do the task? is there
something missing here?

Any post will be of great help, thanks in advance,

Juan Luis Medina
Jul 18 '05 #1
1 1563
> Do you know if I am in the right way to do the task? is there
something missing here?

Any post will be of great help, thanks in advance,


Install pyserial, you can find it on sourceforge. Its platform-independend
(supports even java for jython) and gives a nice, clean api. I went through
all that termios-stuff, and while its possible, pyserial is much better.

--
Regards,

Diez
Jul 18 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by ^CeFoS^ | last post: by
2 posts views Thread by willie | last post: by
3 posts views Thread by collinm | last post: by
13 posts views Thread by Al the programmer | last post: by
13 posts views Thread by Rob | last post: by
4 posts views Thread by rowan | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.