Telnet session

Yannick Turgeon nobody at nowhere.com
Thu Aug 5 13:02:23 EDT 2004


Hello Eddie,

> What happens if set REMOVEJUNK to False?
Same thing except. It does not remove, in that script, "good" output
(textual). And the first symptom of the problem is not bad output but it's
the fact that Telnet.read_until() is freezing after at a given moment, in
our case on "echo bar7". Without a timeout, the function never return.

It's certainly related to Windows. I'm cooked again! I have to interact with
a windows program (not just send a command and get the ouput but instead (1)
start a program, (2) send a commande, (3) get the result, (4) send another
command based on the precedent result). I tryed first with popen3: no
interaction possible if one of your command depends from a precedent program
answer. Pexpect would do the job but it's not working on Windows. Telnet
would do the job too, but it doesn't seem to work correctly on Windows. I
just looked at Perl telnet lib... and I've got nausea, headache and
urticaria! And I don't even know if it would work better, so...

Thanks for your help. At least I know that my script would work fine on
linux and it's probably Windows related.

Yannick

"Eddie Corns" <eddie at holyrood.ed.ac.uk> wrote in message
news:ceqe62$601$1 at scotsman.ed.ac.uk...
> "Yannick Turgeon" <nobody at nowhere.com> writes:
>
> >Hello all,
>
> I don't see anything obviously wrong in the structure, a simpleminded
> translation to linux worked as expected even with a command to generate a
> recursive directory listing which, on my machine, is huge.
>
> What happens if set REMOVEJUNK to False?, I had to do that to see any
output
> but I don't know what Windows generates.  I guess what you're trying to
filter
> out is ANSI control sequences but I suspect you may not have that right
and
> you're removing ALL output.
>
> A minor point, you only need to do the re.compile once, moving it outside
the
> function would be more efficient.
>
> Eddie





More information about the Python-list mailing list