[Python-3000] Path Reform: Get the ball rolling

Greg Ewing greg.ewing at canterbury.ac.nz
Thu Nov 2 06:25:08 CET 2006


Michael Urman wrote:
>>       p = os.path.normpath( os.path.join( __file__, "../..", "lib" ) )
> 
> Shouldn't an example avoid using the path separator directly within a
> string literal?

And avoid using a platform-specific parent
directory specifier:

   p = path.normpath(path.join(__file__, os.pardir, os.pardir, "lib"))

--
Greg


More information about the Python-3000 mailing list