472,103 Members | 1,824 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,103 software developers and data experts.

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 2007
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

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.