First Python project - comments welcome!

Steve Holden steve at holdenweb.com
Mon Apr 7 07:05:49 EDT 2008


Paul Scott wrote:
> I have started, and made some progress (OK it works, but needs some
> love) on my first real Python application.
> 
> http://cvs2.uwc.ac.za/trac/python_tools/browser/podder
> 
> I would love some feedback on what I have done. In total this has taken
> me 5 nights to do (I am working on it at night as PHP, not Python, is my
> day job), so it can probably do with *lots* of improvement. All code is
> GPL.
> 
> If anyone on this list is willing/able, please do give me a few
> pointers, even if it is "This is total crap - RTFM and come back when
> you are ready" I would really appreciate it!
> 
> Many thanks, and thank you to this community for helping me through the
> initial bumps of getting into Python - a great dev tool IMHO!
> 
The code looks pretty good to someone that doesn't know Gtk graphics.

184: self.wTree2=gtk.glade.XML(globaldir+"podder.glade","serverdialogue")

could really do with using os.path.join() if you want to be easily 
cross-platform. Similarly the other places you use globaldir+"...".

At line 321 you loop while True over a Queue.Queue object until the 
QueueEmpty exception is raised, then break out of the loop. It would be 
easier to loop while not queue.empty(). I know the docs say that this 
function is not reliable due to multi-threading semantics, but I doubt 
it will make your program less responsive.

You even put docstrings on your code. WEll done, you are going to enjoy 
Python.

regards
  Steve
-- 
Steve Holden        +1 571 484 6266   +1 800 494 3119
Holden Web LLC              http://www.holdenweb.com/




More information about the Python-list mailing list