Movatterモバイル変換


[0]ホーム

URL:


wxPython: Procedural or OOPS? installation woes etc...

Steve Holdensholden at holdenweb.com
Fri Apr 6 07:50:45 EDT 2001


"Ron Stephens" <rdsteph at earthlink.net> wrote in messagenews:3ACC27AB.1A13151 at earthlink.net...> Can anyone tell me whether wxPython uses a procedural approach to event> driven gui programming, or an object oriented one like Tkinter does???> Don't get me wrong, i am determined to stick it out with Tkinter and> eventually learn it, btu I wouldn't mind a procedural alternative....>The dichotomy is not between prcedural and object-oriented, but betweenlinear-monolithic (what I sometimes call "we ask the questions") andevent-driven.Any program which uses a GUI has to create data structures which relate thewindow structures to the events which a user can trigger, and both wxPythonand Tkinter do the latter by establishing "callbacks", which are snippets ofcode (usually functions) to be called when particular events occur.Window-based programming has always been like this: the initializationbuilds the windows structures, and then calls a "wait-for-event" loop whicheffectively idles the program until some relevant event occurs. Then theappropriate callback is triggered, allowing the program to take action inresponse.This can be done just as "easily" in C as in object-oriented languages likePython. But the style does take a little getting used to.> Also, I downloaded and unpacked the windows version of wxPython. When I> click on wx.py to begin using wxPython, it opens an MS DOS python window> but flashes through some traceback messages too quickly for me to read> them, and then closes out the MS DOS window. Can anyone give me a clue> here?? I guess installing wxPython is more involved than just unzipping> and running an exe installation program...>Well, my installation went just like that! Take a look for demo.py, whichshould have installed in your Start menu under wxPython. It is a verycomprehensive demonstration of the package's features, and makes the codefor these easily available.Good luck.regards Steve


More information about the Python-listmailing list

[8]ページ先頭

©2009-2025 Movatter.jp