On Tuesday 04 December 2007 08:33:13 am Nate Lowrie wrote:

>
> Also note that instead of combining things by yourself, you can use
> the os.path.join function.  It takes any number of arguments and will
> automatically add in the right separator.  Ex. os.path.join("usr",
> "local", "MyDirectory", "MyFile") will spit back
> "/usr/local/MyDirectory/MyFile" on Linux.
>
> It you have to write some code that deals with files and directories,
> you should never need an if statement checking for platform.  Use the
> Standard Library and you won't regret it.
>
> Cheers,
>
> Nate L.

Again Nate you are correct and please keep them coming (your comments that 
is).  I actually did it that way in the first draft of my code.  But then I 
realized it detracted from the points I was attempting to make.  IOWs it one 
more item that should be explained and I wanted anybody reading the code to 
understand what was happening without looking up the os module.

But this is a great sidebar!!!!!!!!!!


-- 
John Fabiani


_______________________________________________
Post Messages to: Dabo-users@leafe.com
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: http://leafe.com/archives/byMID/dabo-users/[EMAIL PROTECTED]

Reply via email to