[PyKDE] Re: How to use "kdialog"

Thorsten Kampe thorsten at thorstenkampe.de
Wed Sep 22 12:56:05 BST 2004


* Jim Bublitz (2004-09-21 21:45 +0200)
> On Tuesday 21 September 2004 12:10, Thorsten Kampe wrote:
>> I want to integrate some simple message boxes in a Python script. Of
>> course I could use EasyGUI (www.ferg.org) but the native KDE look is
>> much nicer.
> 
>> So I installed PyKDE but I couldn't figure out how to code this simple
>> task. Could anyone tell me the equivalent Python code to
>> '"kdialog --msgbox "Hello world"'? using the KDE bindings?
> 
>> Or would "os.system('kdialog --msgbox "Hello world"')" be better
>> (because it doesn't rely on the KDE bindings)?
> 
>> Are there any advantages for using the bindings instead of the system
>> call?
> 
> If all you want is to pop up a few dialogs, the command line kdialog is 
> probably a lot easier, and a lot lighter weight.
> 
> PyKDE and PyQt are intended msotly for writing complete GUI-based apps.
> If that's what you want to do, checkout the KDE docs for the KMessageBox, 
> KDialogBase and KDialog classes.

So the different kdialog options refer to single PyKDE classes? 
"--password" to KPassword? So, I think I'll stick with os.system().

But if someone could provide me with Python pseudocode that would 
achieve the same thing as '"kdialog --msgbox "Hello world"' or 
'"kdialog --password "Enter password"' I'd be grateful. It doesn't 
have to be "working code". I just need the structure to "get the 
picture" and teach myself the rest.

Thorsten




More information about the PyQt mailing list