Instal of wxPython
Okay I have copy and pasted the code from the tutorial on the jpg image http://daniweb.com/techtalkforums/thread33791.html onto my IDE editor. This time no problem with indents!
Now I need to know how to instal required wxPython. I have Windows XP, also Python 2.4. Where do I best get free wxPython and which version?
bumsfeld
Nearly a Posting Virtuoso
1,445 posts since Jul 2005
Reputation Points: 404
Solved Threads: 184
Thanks you much wally,
I downloaded wxPython2.6-win32-unicode-2.6.1.0-py24.exe from
http://www.wxpython.org/download.php#binaries and installed it. The code works greatly.
I was looking through the files it instaled, but could not find a file wx.py. I thought when I import one module it is such a file. How does it work here?
bumsfeld
Nearly a Posting Virtuoso
1,445 posts since Jul 2005
Reputation Points: 404
Solved Threads: 184
Actually wx is a package rather than a file. With a package you should have a folder called wx and within it a file called __init__.py that declares the package. The overall effect is the same. Using wx as the namespace is the more modern convention. This way you are using wx.Button, wx.Panel, wx.Frame, wx.ImageFromStream and so on.
I like it, because it lets you know where functions and constants come from.
Learning wxPython is a little steep at first but very rewarding. Some of the documentation is rather poor, and good sample code is rare. Luckily, with Python you can experiment easily and figure things out! You can also use the Boa Constructor IDE to build wxPython code quickly.
Edit: If you want to know the packages amongst your modules simply run ...
help("modules")
vegaseat
DaniWeb's Hypocrite
5,989 posts since Oct 2004
Reputation Points: 1,345
Solved Threads: 1,417
You right! Documentation is for C++ and no examples. So I hope you and others will be posting good examples, right?
Are any good tutorials out?
bumsfeld
Nearly a Posting Virtuoso
1,445 posts since Jul 2005
Reputation Points: 404
Solved Threads: 184
I would agree with mawe, the wxPython2.6-win32-docs-demos-2.6.1.0.exe file is pretty good. You have to download it (from the same site) and install it separately!
Wally wanted to know what your first project is? I am curious too!
vegaseat
DaniWeb's Hypocrite
5,989 posts since Oct 2004
Reputation Points: 1,345
Solved Threads: 1,417
Now I know which demo mawe was meaning. I downloaded the extra file and instaled it. There are nice examples now!
The project I am working with is a color match skill program. I have a frame, 2 panels, 3 sliders, label and buttons. One panel is colored with random (R,G,B) by the program, then I use sliders R,G, and B to try to match. When done I press button to evaluate and program tells me how close I was, some kind of rating will be done. Supposed to help eye patients.
bumsfeld
Nearly a Posting Virtuoso
1,445 posts since Jul 2005
Reputation Points: 404
Solved Threads: 184