Re: Starting a GUI application out of an console application



put your gui application in another script and start it the same way
you'd start any other application whose exit status you didn't need:
os.popen* or subprocess.Popen.
or, use the threading module to give your qt application another
thread.


Fabian Steiner wrote:
Hello!

I am currently working on an alternative for the gnome-volume-manager
for multiseat systems based on HAL and DBus. Whenever the signal
'DeviceAdded' is received I would like to start a GUI-Interface where
the user can choose from different options. But now I am wondering how I
should start this interface since this GUI must be started by a console
daemon. What is the most common way to do that?

Usually, I start a PyQt application that way:

app = QApplication(sys.argv)
ui = Dialog()
app.setMainWidget(ui)
ui.show()
app.exec_loop()

If I start it that way, I am not quite sure whether this will work since
I have got two main loops then (the one of console daemon [implemented
by using gobject.MainLoop().run()] and the Qt one). Moreover, once the
Qt application is started, it should run independently of the console
daemon.

Unfortunately, I can't think of any possibility to achieve this aim. Do
you have any suggestions?

.



Relevant Pages

  • Re: Very slim Desktop Manager
    ... apt-cache show bmv: ... But bmv and fbi are not pdf viewers. ... With qalculate (or other GUI ... It reminds me of console fonts, ...
    (Debian-User)
  • Re: How do you inherit DOS console in Win32 application?
    ... > How do you inherit and continue using the existing command-line ... > Win32 assembly console application? ... Get these handles using the "GetStdHandle" API, ... But the main gripe here is technical...as you've noticed, a GUI ...
    (alt.lang.asm)
  • Re: Very slim Desktop Manager
    ... that --- no GUI substitute either, ... kind has ever existed in linux, dos or whatever for the console. ... mozilla to use whatever colors one prefers (infact, ... Yeah, I do that too, for the fonts. ...
    (Debian-User)
  • Re: Model View Controller basics.
    ... >don't have the skills to do so. ... write your phonebook application without any GUI. ... Instead give it a console interface. ... Then write a completely separate module (a controller) that *knows* ...
    (comp.object)
  • RE: Interop: C++ Console & C# GUI
    ... the GUI of application that interact with the console. ... The GUI must access some methods included in libraries and exposed by ... It's not clear if the GUI is talking to your console app in any way. ... GUI code makes some decision on updating controls. ...
    (microsoft.public.dotnet.languages.csharp)