First Python project - comments welcome!

Lie Lie.1296 at gmail.com
Mon Apr 7 12:56:32 EDT 2008


On Apr 7, 3:03 pm, Paul Scott <psc... at uwc.ac.za> 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!
>
> --Paul
>
> All Email originating from UWC is covered by disclaimerhttp://www.uwc.ac.za/portal/public/portal_services/disclaimer.htm

I don't know if it was just me, but I can't just scan through your
code briefly to know what it is about (as is with any non-trivial
codes), only after looking through the website's Roadmap I realized
it's something to do with audio and recording. Perhaps you should add
a short module-level docstring that explains in a brief what the code
is about, somewhat like an abstract.

And second, it's just my personal preference, but I usually like to
separate between GUI codes (codes that handle GUI events) and working
code (the real worker). It's just so that if one day you want to
revamp the GUI (e.g. unify the play and pause button into a single
morphing button), you could do it easily without touching the working
code or if you want to call pause() from somewhere else other than GUI
(from an error handler?), you don't call it by pause_click() while no
clicking is done. It's also helpful if someday you want to make a
command-line version of the program (for the same reason, so we don't
call play_click() while what we're doing is typing some commands) or
change the GUI engine. It's also helpful if we want to do something
fancy that is GUI-related, like clicking the play button will keep it
depressed until we click the stop button (like that ol' tape recorder)



More information about the Python-list mailing list