[PyKDE] GUI wrapper for modules
phil at riverbankcomputing.co.uk
Sun May 30 12:06:00 BST 2004
On Sunday 30 May 2004 10:48 am, Thorsten Kampe wrote:
> For my first GUI Python application I thought of a wrapper for my
> utility modules I have already written. Kind of "EasyGUI" 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.
Have you looked at the tutorial examples that come with PyQt? If they weren't
included with your distro then download the original tarball. They are
translations to Python of the Qt tutorials - and read the original Qt
tutorials in the Qt documentation.
More information about the PyQt