[prev in list] [next in list] [prev in thread] [next in thread] 

List:       pykde
Subject:    Re: [PyKDE] Direction of output
From:       Eron Lloyd <elloyd () lancaster ! lib ! pa ! us>
Date:       2004-02-18 19:23:12
Message-ID: 200402181423.12356.elloyd () lancaster ! lib ! pa ! us
[Download RAW message or body]

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@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@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]

_______________________________________________
PyKDE mailing list    PyKDE@mats.imk.fraunhofer.de
http://mats.imk.fraunhofer.de/mailman/listinfo/pykde
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic