This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: add os.sep and friends to os.path
Type: Stage:
Components: Library (Lib) Versions: Python 2.3
process
Status: closed Resolution: accepted
Dependencies: Superseder:
Assigned To: aimacintyre Nosy List: aimacintyre, gvanrossum, skip.montanaro
Priority: normal Keywords: patch

Created on 2003-02-14 06:02 by skip.montanaro, last changed 2022-04-10 16:06 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
ospath.diff skip.montanaro, 2003-02-14 06:05
Messages (7)
msg42843 - (view) Author: Skip Montanaro (skip.montanaro) * (Python triager) Date: 2003-02-14 06:02
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.
msg42844 - (view) Author: Skip Montanaro (skip.montanaro) * (Python triager) Date: 2003-02-14 06:05
Logged In: YES 
user_id=44345

here's the patch file...
msg42845 - (view) Author: Guido van Rossum (gvanrossum) * (Python committer) Date: 2003-02-14 19:32
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.
msg42846 - (view) Author: Skip Montanaro (skip.montanaro) * (Python triager) Date: 2003-02-14 19:45
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.
msg42847 - (view) Author: Andrew I MacIntyre (aimacintyre) * (Python triager) Date: 2003-02-17 07:31
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.
msg42848 - (view) Author: Andrew I MacIntyre (aimacintyre) * (Python triager) Date: 2003-02-17 07:36
Logged In: YES 
user_id=250749

that should be -
"defpath should be defined for 'os2'..."
msg42849 - (view) Author: Andrew I MacIntyre (aimacintyre) * (Python triager) Date: 2003-02-17 09:35
Logged In: YES 
user_id=250749

OS/2 tweaks checked in.  Misc/NEWS updated.
History
Date User Action Args
2022-04-10 16:06:48adminsetgithub: 37983
2003-02-14 06:02:56skip.montanarocreate