469,328 Members | 1,301 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,328 developers. It's quick & easy.

Launch Windows command window....

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 ?

Feb 3 '06 #1
4 1939
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...

Feb 3 '06 #2
Ernesto wrote:
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

Feb 3 '06 #3

jay graves wrote:

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.

Feb 3 '06 #4
wait a minute, that did work correctly. Thanks !

Feb 3 '06 #5

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by Caroline | last post: by
13 posts views Thread by David Rose | last post: by
6 posts views Thread by Charles Neitzel | last post: by
7 posts views Thread by Paul | last post: by
8 posts views Thread by Marcus | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by suresh191 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.