Help me improve my Python Skills, please

Robert Roy rjroy at takingcontrol.com
Sat Jan 15 09:45:56 EST 2000


On 15 Jan 2000 00:43:41 -0700, tarude at whitestar.localdomain (Trebor A.
Rude) wrote:

>
>I just started picking up Python a few days ago, and am rather
>enjoying it.  To help me learn it, I converted one of my old TCL
>scripts into Python, which I've attached below. However, this being my 
>first serious python script, I'm pretty sure I'm doing some things
>less efficiently than necessary, through lack of familiarity with the
>library and language in general. So I'd like to enlist the group's
>help in improving the code. Logic, style, better ways of doing things, 
>whatever.  Thanks in advance.
>
>A little explanation before the code.  The script recursively descends 
>a directory structure, building a .jdb (Jukebox database) file for
>each directory based on the mp3 tag info of the mp3s in that
>directory and all its subdirectories. It also repairs damaged comment
>fields caused by a slightly buggy encoder program.
>
The os.path.walk method provides an elegant way of recursing a
directory structure. It might be useful here.



More information about the Python-list mailing list