<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Generator" CONTENT="MS Exchange Server version 5.5.2653.12">
<TITLE>FW: Comunicating through COM ports</TITLE>
</HEAD>
<BODY>

<P><FONT SIZE=2>I'm using Python 2.1 and I installed it through .exe installer from www.python.org</FONT>
<BR><FONT SIZE=2>-----Original Message-----</FONT>
<BR><FONT SIZE=2>From: David Mallwitz [<A HREF="mailto:dmallwitz@cox.rr.com">mailto:dmallwitz@cox.rr.com</A>] </FONT>
<BR><FONT SIZE=2>Sent: Friday, December 21, 2001 4:12 PM</FONT>
<BR><FONT SIZE=2>To: python-list@python.org</FONT>
<BR><FONT SIZE=2>Subject: Re: Comunicating through COM ports</FONT>
</P>
<BR>

<P><FONT SIZE=2>FW: Comunicating through COM portsWhich Python distribution are you using?</FONT>
<BR><FONT SIZE=2>Or did you compile from source?</FONT>
</P>

<P><FONT SIZE=2>Dave</FONT>
</P>

<P><FONT SIZE=2>"Alves, Carlos Alberto - Coelce" <calves@coelce.com.br> wrote in message</FONT>
<BR><FONT SIZE=2><A HREF="news:mailman.1008955468.30561.python-list@python.org" TARGET="_blank">news:mailman.1008955468.30561.python-list@python.org</A>...</FONT>
<BR><FONT SIZE=2>Sorry, but as I said before, I'm under windows98 and I haven't such</FONT>
<BR><FONT SIZE=2>directory.</FONT>
<BR><FONT SIZE=2>Do I need to download that module from anywhere?!If so, give me an URL.</FONT>
</P>
<BR>

<P><FONT SIZE=2>-----Original Message-----</FONT>
<BR><FONT SIZE=2>From: David Lees [<A HREF="mailto:deblnonospammyno@raqia.com">mailto:deblnonospammyno@raqia.com</A>]</FONT>
<BR><FONT SIZE=2>Sent: Friday, December 21, 2001 1:46 PM</FONT>
<BR><FONT SIZE=2>To: python-list@python.org</FONT>
<BR><FONT SIZE=2>Subject: Re: FW: Comunicating through COM ports</FONT>
</P>
<BR>

<P><FONT SIZE=2>Python21/scripts/PythonSerial</FONT>
<BR><FONT SIZE=2>david lees</FONT>
</P>
<BR>

<P><FONT SIZE=2>> "Alves, Carlos Alberto - Coelce" wrote:</FONT>
<BR><FONT SIZE=2>></FONT>
<BR><FONT SIZE=2>> Thanks for the example. But, where can I find such module Serial?!</FONT>
<BR><FONT SIZE=2>></FONT>
<BR><FONT SIZE=2>> -----Original Message-----</FONT>
<BR><FONT SIZE=2>> From: David Mallwitz [<A HREF="mailto:dmallwitz@cox.rr.com">mailto:dmallwitz@cox.rr.com</A>]</FONT>
<BR><FONT SIZE=2>> Sent: Thursday, December 20, 2001 10:26 PM</FONT>
<BR><FONT SIZE=2>> To: python-list@python.org</FONT>
<BR><FONT SIZE=2>> Subject: Re: Comunicating through COM ports</FONT>
<BR><FONT SIZE=2>></FONT>
<BR><FONT SIZE=2>> Comunicating through COM portsChapter 19 of Mark Hammond and Andy</FONT>
<BR><FONT SIZE=2>> Robinson's</FONT>
<BR><FONT SIZE=2>> 'Python Programmingon on Win32' covers this quit well, and with the</FONT>
<BR><FONT SIZE=2>> Activestate Python distro there is a multithreaded demo called</FONT>
<BR><FONT SIZE=2>> 'win32comport_demo.py'. But here's what I do - example is from a</FONT>
<BR><FONT SIZE=2>> console</FONT>
<BR><FONT SIZE=2>> connection to an old Cisco router.</FONT>
<BR><FONT SIZE=2>></FONT>
<BR><FONT SIZE=2>> >>> from Serial import Serial</FONT>
<BR><FONT SIZE=2>> >>> ### open the COM1 port</FONT>
<BR><FONT SIZE=2>> >>> serialconfig = Serial.PortDict()</FONT>
<BR><FONT SIZE=2>> >>> serialconfig['port'] = Serial.COM1</FONT>
<BR><FONT SIZE=2>> >>> serialconfig['rxBufSize'] = 4096</FONT>
<BR><FONT SIZE=2>> >>> port = Serial.Port(serialconfig)</FONT>
<BR><FONT SIZE=2>> >>> port.open()</FONT>
<BR><FONT SIZE=2>> >>> port.write('show conf \r')</FONT>
<BR><FONT SIZE=2>> >>> x = port.read()</FONT>
<BR><FONT SIZE=2>> >>> x</FONT>
<BR><FONT SIZE=2>> 'show conf \r\nUsing 768 out of 32762 bytes\r\n!\r\nversion 11.1\r\nno</FONT>
<BR><FONT SIZE=2>></FONT>
<BR><FONT SIZE=2>> service u</FONT>
<BR><FONT SIZE=2>> dp-small-servers\r\nno service tcp-small-servers\r\n!\r\nhostname</FONT>
<BR><FONT SIZE=2>> Router\r\n!\r\</FONT>
<BR><FONT SIZE=2>> n!\r\nip subnet-zero\r\nno ip domain-lookup\r\n!\r\nhub ether 0 1\r\n</FONT>
<BR><FONT SIZE=2>> link-test\</FONT>
<BR><FONT SIZE=2>> r\n auto-polarity\r\n!\r\nhub ether 0 2\r\n link-test\r\n</FONT>
<BR><FONT SIZE=2>> auto-polarity\r\n!\r\n</FONT>
<BR><FONT SIZE=2>> hub ether 0 3\r\n link-test\r\n auto-polarity\r\n --More-- '</FONT>
<BR><FONT SIZE=2>></FONT>
<BR><FONT SIZE=2>> Best,</FONT>
<BR><FONT SIZE=2>> Dave</FONT>
<BR><FONT SIZE=2>></FONT>
<BR><FONT SIZE=2>> "Alves, Carlos Alberto - Coelce" <calves@coelce.com.br> wrote in</FONT>
<BR><FONT SIZE=2>> message</FONT>
<BR><FONT SIZE=2>> <A HREF="news:mailman.1008852145.28654.python-list@python.org" TARGET="_blank">news:mailman.1008852145.28654.python-list@python.org</A>...</FONT>
<BR><FONT SIZE=2>> Anybody could give me an example code of how connect/comunicate</FONT>
<BR><FONT SIZE=2>> through COM</FONT>
<BR><FONT SIZE=2>> ports (i.e. COM1, COM2). I'm under windows 98.</FONT>
<BR><FONT SIZE=2>> Thanks!!!</FONT>
<BR><FONT SIZE=2>> Carlos Alberto</FONT>
<BR><FONT SIZE=2>> COELCE/DPRON-Departamento de Projetos e Obras Norte</FONT>
<BR><FONT SIZE=2>> Fone: 677- 2228</FONT>
<BR><FONT SIZE=2>> e-mail: calves@coelce.com.br</FONT>
<BR><FONT SIZE=2>> \|||/</FONT>
<BR><FONT SIZE=2>> (o o)</FONT>
<BR><FONT SIZE=2>> --ooo0-(_)-0ooo--</FONT>
<BR><FONT SIZE=2>></FONT>
<BR><FONT SIZE=2>> -----=  Posted via Newsfeeds.Com, Uncensored Usenet News  =-----</FONT>
<BR><FONT SIZE=2>> <A HREF="http://www.newsfeeds.com" TARGET="_blank">http://www.newsfeeds.com</A> - The #1 Newsgroup Service in the World!</FONT>
<BR><FONT SIZE=2>>  Check out our new Unlimited Server. No Download or Time Limits!</FONT>
<BR><FONT SIZE=2>> -----==  Over 80,000 Newsgroups - 19 Different Servers!  ==-----</FONT>
<BR><FONT SIZE=2>> --</FONT>
<BR><FONT SIZE=2>> <A HREF="http://mail.python.org/mailman/listinfo/python-list" TARGET="_blank">http://mail.python.org/mailman/listinfo/python-list</A></FONT>
<BR><FONT SIZE=2>--</FONT>
<BR><FONT SIZE=2>debl</FONT>
<BR><FONT SIZE=2>--</FONT>
<BR><FONT SIZE=2><A HREF="http://mail.python.org/mailman/listinfo/python-list" TARGET="_blank">http://mail.python.org/mailman/listinfo/python-list</A></FONT>
</P>
<BR>
<BR>
<BR>

<P><FONT SIZE=2>-----=  Posted via Newsfeeds.Com, Uncensored Usenet News  =-----</FONT>
<BR><FONT SIZE=2><A HREF="http://www.newsfeeds.com" TARGET="_blank">http://www.newsfeeds.com</A> - The #1 Newsgroup Service in the World!</FONT>
<BR><FONT SIZE=2> Check out our new Unlimited Server. No Download or Time Limits!</FONT>
<BR><FONT SIZE=2>-----==  Over 80,000 Newsgroups - 19 Different Servers!  ==-----</FONT>
<BR><FONT SIZE=2>-- </FONT>
<BR><FONT SIZE=2><A HREF="http://mail.python.org/mailman/listinfo/python-list" TARGET="_blank">http://mail.python.org/mailman/listinfo/python-list</A></FONT>
</P>

</BODY>
</HTML>