Launch Windows command window....

E

Ernesto

I'm trying to launch a seperate telnet window from within my python
program. The command I thought I was supposed to use is below:

os.system("telnet.exe -f C:\Folder\output.txt localhost 6000")

This creates a telnet window inside the current window. This is not
desirable. I need it to launch a seperate command window for telnet
output. Any ideas ?
 
E

Ernesto

I'm one step closer...

subprocess.Popen("telnet.exe -f C:\Folder\output.txt localhost 6000")

is improved, but still doesn't launch a SEPERATE window...
 
J

jay graves

Ernesto said:
subprocess.Popen("telnet.exe -f C:\Folder\output.txt localhost 6000")
is improved, but still doesn't launch a SEPERATE window...

This should work but only lightly tested.
subprocess.Popen("start telnet.exe -f C:\Folder\output.txt localhost
6000",shell=True)

You don't say what you are trying to do but if you are trying to drive
telnet maybe you want the pexpect module.
http://pexpect.sourceforge.net/

I've never had the need to use it myself so I can't offer any other
advice.

....
jay graves
 
E

Ernesto

jay said:
This should work but only lightly tested.
subprocess.Popen("start telnet.exe -f C:\Folder\output.txt localhost
6000",shell=True)

Thanks a lot, but this still didn't launch a seperate telnet window. I
just want the telnet window to open up and do "it's thing" in the
background. Thanks again.
 

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

Members online

No members online now.

Forum statistics

Threads
474,283
Messages
2,571,405
Members
48,098
Latest member
inno vation

Latest Threads

Top