[Patches] [ python-Patches-686397 ] add os.sep and friends to os.path

SourceForge.net noreply@sourceforge.net
Sun, 16 Feb 2003 23:36:40 -0800


Patches item #686397, was opened at 2003-02-14 17:02
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=686397&group_id=5470

Category: Library (Lib)
Group: Python 2.3
Status: Open
Resolution: Accepted
Priority: 5
Submitted By: Skip Montanaro (montanaro)
Assigned to: Andrew I MacIntyre (aimacintyre)
Summary: add os.sep and friends to os.path

Initial Comment:
The attached patch implements an idea I brought up on
python-dev, namely that several platform-dependent
path-related variables should be available via the
platform-dependent path modules (ntpath, etc), not just
via the os module.  Those variables are sep, altsep,
extsep, pathsep, curdir, pardir and defpath.  Although
I disagree with Guido about how these variables should be
documented, all I did doc-wise was note in libos.tex that
these variables are also available via os.path.

The attached patch implements that idea and seems
to work properly on the one platform (Mac OS X) I
tried it on.  The os/2 stuff seemed the most likely to
have problems, so am assigning to Andrew MacIntyre,
at least to start with.  Andrew, feel free to pass it
around, just don't pass it back to me.  I'm headed out
of town for a week.

----------------------------------------------------------------------

>Comment By: Andrew I MacIntyre (aimacintyre)
Date: 2003-02-17 18:36

Message:
Logged In: YES 
user_id=250749

that should be -
"defpath should be defined for 'os2'..."

----------------------------------------------------------------------

Comment By: Andrew I MacIntyre (aimacintyre)
Date: 2003-02-17 18:31

Message:
Logged In: YES 
user_id=250749

Looks OK, except for 2 very minor items in ntpath.py:
- the comment shouldn't read "w/ EMX" as EMX uses 
os2emxpath.py (should probably refer to VACPP);
- defpath should be defined for 'os' - and be the same as 
everything else except 'ce'.

Given that Skip is OOT, I'll fix this in CVS and close the 
patch.

----------------------------------------------------------------------

Comment By: Skip Montanaro (montanaro)
Date: 2003-02-15 06:45

Message:
Logged In: YES 
user_id=44345

Checked in as

  Lib/os.py 1.67
  Lib/os2emxpath.py 1.10
  Lib/posixpath.py 1.58
  Lib/macpath.py 1.46
  Lib/ntpath.py 1.55
  Lib/plat-riscos/riscospath.py 1.9
  Doc/lib/libos.tex 1.114

Marking accepted but leaving assigned to Andrew for OS/2 checks.

----------------------------------------------------------------------

Comment By: Guido van Rossum (gvanrossum)
Date: 2003-02-15 06:32

Message:
Logged In: YES 
user_id=6380

Skip, this looks good. Please check it in, but leave it
assigned to Andrew for an OS/2 check. I'd like to release
2.3a2 with this, and I hope to do that next Tuesday.

----------------------------------------------------------------------

Comment By: Skip Montanaro (montanaro)
Date: 2003-02-14 17:05

Message:
Logged In: YES 
user_id=44345

here's the patch file...

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=686397&group_id=5470