Newbie: Looking for code review on my first Python project.

88888 Dihedral dihedral88888 at googlemail.com
Wed Jan 11 19:24:31 EST 2012


HoneyMonster於 2012年1月12日星期四UTC+8上午5時09分13秒寫道:
> On Wed, 11 Jan 2012 11:39:48 +0000, HoneyMonster wrote:
> 
> > On Tue, 10 Jan 2012 18:17:48 -0700, Ian Kelly wrote:
> > 
> >> On Tue, Jan 10, 2012 at 4:44 PM, HoneyMonster
> >> <someone at someplace.invalid> wrote:
> >>> Hi,
> >>>
> >>> I'm new to Python and recently completed my first project. I used
> >>> wxPython with wxGlade to generate the GUI bits.The application seems
> >>> to work well, but I am entirely self-taught, so have undoubtedly
> >>> committed a number of howlers in terms of style, design, standards,
> >>> best practice and so forth.
> > < snip constructive and helpful advice >
> > 
> > Very many thanks to Ian and to all who responded. I really appreciate
> > the guidance. Cheers.
> 
> 
> I have taken on board the helpful suggestions offered, and looked though 
> the PEP-8 document which has been mentioned.
> 
> As a result, there are a number of changes to the code. My second attempt 
> is in the same place:
> 
> <http://dl.dropbox.com/u/6106778/bbc.py>
> 
> A couple of points:
> 
> 1) I'm reluctant to try to improve this bit of code:
> -------------------------------------------------------------
>         self.add = wx.MenuItem(self.file, wx.NewId(), "&Add to Queue", 
> "Add a programme to the queue (for download later)", wx.ITEM_NORMAL)
>         self.file.AppendItem(self.add)
> -------------------------------------------------------------
> since it is generated by wxGlade and so will be overwritten.
> 
> 2) I was very unsure about the wx.CallAfter, and suspect that I have put 
> it in the wrong place. It seems to pass off well enough in Linux, but on 
> Windows it appears to prevent the widgets on the splash frame being drawn 
> properly.
> 
> If anyone would be kind enough, further comments would be welcomed.
> 
> Thanks,
> WH

I haven't tried wxGlade for several years. I checked BOA, WxGlade and  Wxpython 
and pygame 4 years ago. Auto code generators in BOA and WxGlade are more helpful
to python programmers.  

One can develop GUI by  python with  Tcl/tk or Qt, too.   
But the license conditions in software packages are not all the same.  




More information about the Python-list mailing list