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

List:       pykde
Subject:    Re: [PyKDE] GUI wrapper for modules
From:       Phil Thompson <phil () riverbankcomputing ! co ! uk>
Date:       2004-05-30 10:05:19
Message-ID: 200405301105.19321.phil () riverbankcomputing ! co ! uk
[Download RAW message or body]

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"[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.

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.

Phil

_______________________________________________
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