"Tim Golden" <[email protected]> wrote in message news:[email protected]...
Tim Golden wrote:
Alan Gauld wrote:
"Sigga Sig" <[email protected]> wrote

I am writing a code that is supoesed to act as routers and i need to open a different cmd window for each one of them with it's name and so on. I do not
know how to implement in mi Python cod a sentece that opens such a cmd.

I know how to open a cmd.exe bud not with specific attributes that are
needed.


Does this do what you want? It creates a new cmd window titled "Dir", then executes some commands. If you want the window to stay open after executing the commands, use /k instead of /c. 'cmd /?' gives other switches you might want. The escaping(^) of the ampersands(&) is required or the commands will run in the current console not the new one.

import os
os.system('start cmd /c title Dir ^&^& dir ^&^& pause')

-Mark


_______________________________________________
Tutor maillist  -  [email protected]
http://mail.python.org/mailman/listinfo/tutor

Reply via email to