[Python-3000] Path Reform: Get the ball rolling
Josiah Carlson
jcarlson at uci.edu
Wed Nov 1 17:32:08 CET 2006
Oleg Broytmann <phd at phd.pp.ru> wrote:
> On Wed, Nov 01, 2006 at 08:03:55AM -0600, 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?
> >
> > p = path.normpath(path.join(__file__, "..", "..", "lib"))
>
> It also should use platform-independent constants:
>
> p = path.normpath(path.join(__file__, os.pardir, os.pardir, "lib"))
What operating systems that Python currently supports doesn't have ".."
mean "parent directory"? And/or What systems currently in development
don't have ".." meaning "parent directory"? Are they significant enough
for us to care?
- Josiah
More information about the Python-3000
mailing list