close telnet

E

ern

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 ?
 
E

ern

ern said:
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...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top