Read data from Serial Command
brianrpsgt1
brianlong at cox.net
Fri Oct 10 19:56:43 EDT 2008
That did it! The fix was the '\r'
Thanks for the assistance Dennis and Grant!
Dennis Lee Bieber wrote:
> On Fri, 10 Oct 2008 15:40:08 -0700 (PDT), brianrpsgt1
> <brianlong at cox.net> declaimed the following in comp.lang.python:
>
> > Again, what is weird is that all works fine in Hyperterminal, but not
> > with the Python script.
> >
> And are you hitting the return key when using Hyperterminal?
>
> > > >
> > > > Try changing that to
> > > >
> > > > s.write('sh nw enc')
>
> s.write("sh nw enc\r") #presuming you have to hit the return key in
> Hyperterminal
>
> You may also want to configure the serial port with a read timeout
> --
> Wulfraed Dennis Lee Bieber KD6MOG
> wlfraed at ix.netcom.com wulfraed at bestiaria.com
> HTTP://wlfraed.home.netcom.com/
> (Bestiaria Support Staff: web-asst at bestiaria.com)
> HTTP://www.bestiaria.com/
More information about the Python-list
mailing list