close telnet  
Author Message
Syndesis





PostPosted: Wed Mar 29 12:39:19 CST 2006 Top

Windows XP >> close telnet I realize this isn't a python newsgroup, but this is mostly a windows
question....

Currently, I'm launching a telnet window with a python call like this:

TSS_Handle = subprocess.Popen("start telnet.exe -f " + TSS_Log_Path + "
localhost 6000", shell=True)

which is essentially the equivalent of typing

"start telnet.exe -f myLogFile.txt localhost 6000"

into a command window. The problem is that I can't close the telnet
session I create (with any conventional python methods that I know of).
Is there a way to close all telnet windows currently open or some
other method which will perform a telnet termination ?

Windows XP566  
 
 
AllenM





PostPosted: Wed Mar 29 12:39:19 CST 2006 Top

Windows XP >> close telnet Have you tried the "quit" command?

"ern" <EMail@HideDomain.com> wrote in message
news:EMail@HideDomain.com...
>I realize this isn't a python newsgroup, but this is mostly a windows
> question....
>
> Currently, I'm launching a telnet window with a python call like this:
>
> TSS_Handle = subprocess.Popen("start telnet.exe -f " + TSS_Log_Path + "
> localhost 6000", shell=True)
>
> which is essentially the equivalent of typing
>
> "start telnet.exe -f myLogFile.txt localhost 6000"
>
> into a command window. The problem is that I can't close the telnet
> session I create (with any conventional python methods that I know of).
> Is there a way to close all telnet windows currently open or some
> other method which will perform a telnet termination ?
>


 
 
ern





PostPosted: Thu Mar 30 15:04:56 CST 2006 Top

Windows XP >> close telnet
AllenM wrote:
> Have you tried the "quit" command?
>
> "ern" <EMail@HideDomain.com> wrote in message
> news:EMail@HideDomain.com...
> >I realize this isn't a python newsgroup, but this is mostly a windows
> > question....
> >
> > Currently, I'm launching a telnet window with a python call like this:
> >
> > TSS_Handle = subprocess.Popen("start telnet.exe -f " + TSS_Log_Path + "
> > localhost 6000", shell=True)
> >
> > which is essentially the equivalent of typing
> >
> > "start telnet.exe -f myLogFile.txt localhost 6000"
> >
> > into a command window. The problem is that I can't close the telnet
> > session I create (with any conventional python methods that I know of).
> > Is there a way to close all telnet windows currently open or some
> > other method which will perform a telnet termination ?
> >

Would you just say quit in the same window that you opened it ?

 
 
ern





PostPosted: Thu Mar 30 15:18:55 CST 2006 Top

Windows XP >> close telnet
ern wrote:
> I realize this isn't a python newsgroup, but this is mostly a windows
> question....
>
> Currently, I'm launching a telnet window with a python call like this:
>
> TSS_Handle = subprocess.Popen("start telnet.exe -f " + TSS_Log_Path + "
> localhost 6000", shell=True)
>
> which is essentially the equivalent of typing
>
> "start telnet.exe -f myLogFile.txt localhost 6000"
>
> into a command window. The problem is that I can't close the telnet
> session I create (with any conventional python methods that I know of).
> Is there a way to close all telnet windows currently open or some
> other method which will perform a telnet termination ?

I think the answer I was looking for came from taskkill.

TSS_Handle = subprocess.Popen("TASKKILL /F /IM telnet.exe", shell=True)

or just

"TASKKILL /F /IM telnet.exe"

in plain windows talk...