run subprocess in separate window

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Radek

    #1

    run subprocess in separate window

    Hi,

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

    Currently when using subprocess.Pope n("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

  • aurelien.campeas@logilab.fr

    #2
    Re: run subprocess in separate window


    Radek a écrit :
    Hi,
    >
    I am trying to create GUI launcher of several applications using Python
    and Tkinter.
    >
    Currently when using subprocess.Pope n("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.

    Comment

    • Radek

      #3
      Re: run subprocess in separate window

      Hello,

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

      Radek


      aurelien.campea s@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.Pope n("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.

      Comment

      • heracek

        #4
        Re: run subprocess in separate window



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

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

        or:

        p = subprocess.Pope n(args=['command', 'arg1', 'arg2'],
        stdout=subproce ss.PIPE,
        stderr=subproce ss.PIPE)
        print p.stderr.read()
        print p.stdout.read()

        h.

        Comment

        Working...