468,306 Members | 1,394 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

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

run subprocess in separate window

Hi,

I am trying to create GUI launcher of several applications using Python
and Tkinter.

Currently when using subprocess.Popen("mycommand") all output goes to
the stdout of my launcher.

For some command line applications I need to launch them so that their
output goes into the separate "terminal" window.

How can I make it?

Thanks,

Radek

Oct 15 '06 #1
3 2200

Radek a écrit :
Hi,

I am trying to create GUI launcher of several applications using Python
and Tkinter.

Currently when using subprocess.Popen("mycommand") all output goes to
the stdout of my launcher.

For some command line applications I need to launch them so that their
output goes into the separate "terminal" window.

How can I make it?

Thanks,

Radek
Hello, have a look at the subprocess module, it might help you get to
what you want.

Oct 16 '06 #2
Hello,

as you can see, I tried subprocess methods. But could not find the
right call.

Radek
au**************@logilab.fr wrote:
Radek a écrit :
Hi,

I am trying to create GUI launcher of several applications using Python
and Tkinter.

Currently when using subprocess.Popen("mycommand") all output goes to
the stdout of my launcher.

For some command line applications I need to launch them so that their
output goes into the separate "terminal" window.

How can I make it?

Thanks,

Radek

Hello, have a look at the subprocess module, it might help you get to
what you want.
Oct 16 '06 #3


On Oct 15, 6:43 pm, "Radek" <radek.sv...@gmail.comwrote:
Currently when using subprocess.Popen("mycommand") all output goes to
the stdout of my launcher.
Hi,
the solution is:

p = subprocess.Popen(args=['command', 'arg1', 'arg2'],
stdout=subprocess.PIPE,
stderr=subprocess.STDOUT)
print p.stdout.read() # stderr and strout mix

or:

p = subprocess.Popen(args=['command', 'arg1', 'arg2'],
stdout=subprocess.PIPE,
stderr=subprocess.PIPE)
print p.stderr.read()
print p.stdout.read()

h.

Oct 27 '06 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

6 posts views Thread by Ernesto | last post: by
1 post views Thread by zloster | last post: by
reply views Thread by Michel Lespinasse | last post: by
25 posts views Thread by Jeremy Banks | last post: by
reply views Thread by Gabriel Genellina | last post: by
2 posts views Thread by dudeja.rajat | last post: by
reply views Thread by Amanda Jamin | last post: by
reply views Thread by Eric Carlson | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.