[PyKDE] GUI wrapper for modules

Thorsten Kampe thorsten at thorstenkampe.de
Sun May 30 11:49:00 BST 2004


For my first GUI Python application I thought of a wrapper for my
utility modules I have already written. Kind of "EasyGUI"[1] style but
much less sophisticated.

I've got a module "test.py" in $PYTHONPATH containing one function:
def multiply_by_two(x):
    return x * 2

Now the GUI app should do the following:
* import module test
* show one button with the following function:
When I click on the button display one input form where I can enter a
number and say "please enter a number". Then the application takes the
number executes test.multiply_by_two(number) and display the result
with message "the result is:"
    
If anyone could provide me with the appropriate Python/PyQt code (even
some "Pseudo Python code"), I'd be grateful.


Thorsten

[1] http://www.ferg.org/easygui/




More information about the PyQt mailing list