[Python-bugs-list] [ python-Bugs-418817 ] path separator constant
noreply@sourceforge.net
noreply@sourceforge.net
Thu, 26 Apr 2001 00:23:13 -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: Closed
>Resolution: Wont Fix
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
----------------------------------------------------------------------
>Comment By: Martin v. Löwis (loewis)
Date: 2001-04-26 00:23
Message:
Logged In: YES
user_id=21627
Grant, it appears that you accept the state of matters as
sufficient, so I close this. If you disagree, please let me
know so I'll reopen it.
----------------------------------------------------------------------
Comment By: Grant Griffin (dspguru)
Date: 2001-04-25 06:59
Message:
Logged In: YES
user_id=70844
Ooops! I guess os.sep covers that.
I think the reason I didn't find it is that it's a "path" thing, yet it's not in "os.path". But I guess it's too late
to change that...
=g2
----------------------------------------------------------------------
Comment By: Michael Hudson (mwh)
Date: 2001-04-25 06:32
Message:
Logged In: YES
user_id=6656
do you know about os.sep?
----------------------------------------------------------------------
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=418817&group_id=5470