[Tutor] Python program design

Doug Glenn doug at foruminfosystems.com
Tue Jul 24 13:24:52 CEST 2007


On 7/23/07, Tiger12506 <keridee at jayco.net> wrote:
>
> The line should be
> s = getsize(join(root, name))
>
> which will print the file size for each "name in files"


I got it a bit later. It didn't like me trying to apply it in a print
statement but if I assigned it first and the printed it, no issue.


> You may wish to build a dict inside your dict.
>
> {(discID, discLbl): {'dir': '...',
>                                  'filename': '...",
> etc.


That was my thinking also. I just don't know enough about databases to know
if I should shove the data raw into the DB or do some sorting first.


> I don't know how you want to use it, but keeping the root directory is not
> very useful. If you ever want to transfer your files to another computer
>

If I were cataloging hard drives I would tend to agree.  But this is for
removable media and backups so "anything goes", especially since I would
like to GPL it later and noobs will be using it so I can't make assumptions
on their behavior :)   I may stick everything in a sub directory to help
organize it, but using my CD creator program I just tend to drag and drop
them as I see them.

Thanks for the input!


-- 
Doug Glenn
FORUM Information Systems, LLC
http://foruminfosystems.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/tutor/attachments/20070724/536489c0/attachment.html 


More information about the Tutor mailing list