telnetlib

Erik de Castro Lopo erikd at zip.com.au
Mon Jul 31 21:00:29 EDT 2000


Timothy Grant wrote:
> 
> On Mon, Jul 31, 2000 at 03:17:10PM +0000, Guido van Rossum wrote:
> > Timothy Grant <tjg at exceptionalminds.com> writes:
> >
> > > Everything works great until I enter the Terminal type. It appears that the
> > > telnet session stops receiving at that point. As you can see from the
> > > Traceback I receive the echo of from my write, but then don't receive the
> > > next prompt.
> > >
> > > I'm guessing it has something to do with either changing the terminal type
> > > on telnetlib, or a timing issue, but I'm stumped at the moment.
> >
> > Could you post a transcript of what the session looks like when you do
> > it manually???
> >
> > A random "poke-and-hope" suggestion: perhaps you could use \r instead
> > of \n in input???
> 
> OK, now I'm cautiously optimistic. Things look like they are working
> correctly, though I still have a ways to go before I am convinced of the
> fact.

Beware of newline characters on unusual OSes. As we all know, Unix and
unix-like OSes use \n while DOS and windows etc use \r\n.

Just to confuse things, OS9 (a realtime OS) and IIRC Mac use \r!!!!

Its always worth trying all three possibilities.

Erik
-- 
+-------------------------------------------------+
     Erik de Castro Lopo     erikd at zip.com.au
+-------------------------------------------------+
Those who do not understand Unix are condemned to reinvent it, poorly.  
-- Henry Spencer



More information about the Python-list mailing list