|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now! |
|
#1
|
|||
|
|||
|
wxPython
Ok this is a dumb question but I can't find any other way... I'm programming a gui in wxPython.. let say if I have 2 text box, the first one for user input, and the second one display the answer... my program will run like this.. the user will insert numbers in the first text box.. then the program will multiply the number with 2 then display the answer in the second text box.. how could I do this... I tried it copule of times but keep getting error... Thank you
|
|
#2
|
||||
|
||||
|
What Error are you getting? Might also help if you post the problem code
![]() Mark. |
|
#3
|
|||
|
|||
|
Quote:
here's what I got Code:
Traceback (most recent call last):
File "C:\Python22\Test\gui3.py", line 23, in OnClear
inch = a/2.54
TypeError: unsupported operand type(s) for /: 'str' and 'float'
I know it's dumb thing.. but I'm just starting out with GUI stuff.. so need to get something clear..Another thing, is there anyway I could use Python to access and manipulate MS Access database?? |
|
#4
|
||||
|
||||
|
Try this instead:
inch = float(a)/2.54
__________________
Up the Irons What Would Jimi Do? Smash amps. Burn guitar. Take the groupies home. "Death Before Dishonour, my Friends!!" - Bruce D ickinson, Iron Maiden Aug 20, 2005 @ OzzFest Down with Sharon Osbourne Puzzle of the Month solved by sizeablegrin, etienne141 and L7Sqr, superior C/C++ programmers of the month |
|
#5
|
||||
|
||||
|
As for fiddling with MS Access, what say you try out my ADO tutorial
![]() |
|
#6
|
||||
|
||||
|
Typically you might have a "Calculate" button widget which wxPython will use to launch an on-click event signal that will be routed to your on-click event handler function.
You will need too assign the event to the handler function in your code. The event handler function then reads your two values from the two entry widgets, calculates the answer then updates the output widget. BTW are you using the Boa Constructor? Boa make the business of tying events to functions pretty easy. Grim.
__________________
*** Experimental Python Markup CGI V2 *** |
|
#7
|
|||
|
|||
|
Quote:
Thanx.. it works... now hwre could I get the full wxPython manual/documentation?? |
|
#9
|
|||
|
|||
|
Hello,
In the wxPython directory on Linux there also is a "demo" directory with many and good examples. In the demo directory you can simply launch "demo.py". ( I suppose it also were installed on Windows ) |
![]() |
| Viewing: Dev Shed Forums > Programming Languages > Python Programming > wxPython |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|