[PyKDE] Direction of output

Eron Lloyd elloyd at lancaster.lib.pa.us
Wed Feb 18 20:24:01 GMT 2004


Come to think about it, you could also try working with QProcess... it all 
depends on the app, though.

Eron

On Tuesday 17 February 2004 10:44 pm, ml at www.prostatepointers.org wrote:
> >> Suppose you have a simple pyqt window with two buttons: button 1 prints
> >> the message "message 1" to stdout.  button 2 prints the message
> >> "message 2" to stdout.
> >>
> >> Ok, open two apps, say xedit and konqueror and direct konqueror to a
> >> form.
> >> In a third window, start your pyqt app.  How do you cause the action
> >> of button 1 to be directed to xedit and button 2 to be directed to the
> >> konqueror form?
> >>
> >> If not stdout, how do you accomplish this?
> >
> > You could write the messages from button 2 to stderr or to a named pipe
> > (fifo).
> >
> > regards
> > Roland
>
> Thanks for the reply, Roland.  In my (above) example, I really don't know
> which apps will be running, so I can't pipe the output to the app unless
> there is a way to grab the name of the app when I focus its window. (I
> don't know how to do this.)  Further, stdout goes to the window where the
> python app starts, not the application window that I focus prior to
> clicking on button 1 or 2.
>
> When I focus an app window, is there a simple way to grab the app name?
> If so, as you suggested, perhaps a pipe would work.
>
> Thanks,
>
> gary
>
> _______________________________________________
> PyKDE mailing list    PyKDE at mats.imk.fraunhofer.de
> http://mats.imk.fraunhofer.de/mailman/listinfo/pykde
> ---
> [This E-mail scanned for viruses by Declude Virus]
---
[This E-mail scanned for viruses by Declude Virus]




More information about the PyQt mailing list