By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
439,932 Members | 1,908 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 439,932 IT Pros & Developers. It's quick & easy.

run subprocess in separate window

P: n/a
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
Share this Question
Share on Google+
3 Replies


P: n/a

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

P: n/a
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

P: n/a


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.