By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
444,035 Members | 1,324 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 444,035 IT Pros & Developers. It's quick & easy.

Configuring the serial port

P: n/a
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
Share this Question
Share on Google+
1 Reply


P: n/a
> 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.