[Python-bugs-list] [ python-Bugs-418817 ] path separator constant
noreply@sourceforge.net
noreply@sourceforge.net
Wed, 25 Apr 2001 06:16:27 -0700
Bugs item #418817, was updated on 2001-04-25 06:16
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=418817&group_id=5470
Category: Extension Modules
Group: Feature Request
Status: Open
Resolution: None
Priority: 5
Submitted By: Grant Griffin (dspguru)
Assigned to: Nobody/Anonymous (nobody)
Summary: path separator constant
Initial Comment:
I would like to request that os.path provide a
constant to convey the platform's path separator
character, to help make certain manual path
manipulations more platform-independent. I would
recommend:
os.path.separator = '\' for Windows and DOS
os.path.separator = '/' for others
Currently, users can obtain the separator character
using os.path.normcase('/'), so, unfortunately,
providing a special constant for this creates the
dreaded "more than one way to do it". However, I
don't regard the normcase construct as being at
all "obvious": I discovered it only after looking at
the os.path source.
Therefore, if the current method via os.path.normcase
('/') is deemed to be adequate (and so eliminates any
need for a special constant), I would recommend adding
a description of this special use to os.path's
documentation.
thanks much-ly,
=g2
----------------------------------------------------------------------
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=418817&group_id=5470