Neal Norwitz
c695e8f6ba
supports_unicode_filenames should not have been backported, test___all__ now passed
2003-01-13 19:29:38 +00:00
Neal Norwitz
9bb985450d
Backport for SF # 659228, 'realpath' function missing from os.path
2003-01-10 23:47:53 +00:00
Raymond Hettinger
f29109aef1
Backport 1.45:
...
Allow abspath to still do something sensisble if the nt module can not be imported.
2002-10-06 04:34:44 +00:00
Tim Peters
6a3e5f14a6
SF bug 478425: Change in os.path.join (ntpath.py)
...
ntpath.join('a', '') was producing 'a' instead of 'a\\' as in 2.1.
Impossible to guess what was ever *intended*, but since split('a\\')
produces ('a', ''), I think it's best if join('a', '') gives 'a\\' back.
2001-11-05 21:25:02 +00:00
Tim Peters
cf5e6a4a5d
SF bug [ #469732 ] os.path.walk docstring inconsistent.
...
We have 5 implementations of walk(), and 5 different docstrings. Combined
'em. Let's see how long it takes before they're all different again!
2001-10-10 04:16:20 +00:00
Guido van Rossum
83eeef4b06
SF patch #461781 by Chris Lawrence: os.path.realpath - Resolve symlinks:
...
Once upon a time, I put together a little function
that tries to find the canonical filename for a given
pathname on POSIX. I've finally gotten around to
turning it into a proper patch with documentation.
On non-POSIX, I made it an alias for 'abspath', as
that's the behavior on POSIX when no symlinks are
encountered in the path.
Example:
>>> os.path.realpath('/usr/bin/X11/X')
'/usr/X11R6/bin/X'
2001-09-17 15:16:09 +00:00
Tim Peters
54a14a373e
SF bug #456621 : normpath on Win32 not collapsing c:\\..
...
I actually rewrote normpath quite a bit: it had no test cases, and as
soon as I starting writing some I found several cases that didn't make
sense.
2001-08-30 22:05:26 +00:00
Tim Peters
33dc0a1705
One more crack at join(): stop trying to pretend this isn't a mass of
...
special cases. test_pkg works again on Windows.
2001-07-27 08:09:54 +00:00
Tim Peters
4223f89edd
Change ntpath.join() so that join("d:/", "/whatever") returns
...
d:/whatever instead of /whatever. While I'm afraid changing isabs()
to be *consistent* with this would break lots of code, it makes
best sense for join() to do it this way. Thanks to Alex Martelli for
pushing back on this one!
2001-07-26 21:54:37 +00:00
Fred Drake
79e75e1916
Use string.ascii_letters instead of string.letters (SF bug #226706 ).
2001-07-20 19:05:50 +00:00
Tim Peters
1bdd0f2559
SF bug #44271 : os.path.expanduser problem w/o HOME set.
...
This is a Windows-specific glitch that's really due to that, e.g.,
ntpath.join("c:", "/abc") returned "/abc" instead of "c:/abc". Made
join smarter.
Bugfix candidate.
2001-07-19 17:18:18 +00:00
Fred Drake
da05e977f3
abspath(): Fix inconsistent indentation.
2001-05-15 15:23:01 +00:00
Mark Hammond
ef8b654bbe
Add support for Windows using "mbcs" as the default Unicode encoding when dealing with the file system. As discussed on python-dev and in patch 410465.
2001-05-13 08:04:26 +00:00
Skip Montanaro
269b83bc05
added several more __all__ lists
2001-02-06 01:07:02 +00:00
Tim Peters
2344fae6d0
Whitespace normalization.
2001-01-15 00:50:52 +00:00
Fred Drake
8152d32375
Update the code to better reflect recommended style:
...
Use != instead of <> since <> is documented as "obsolescent".
Use "is" and "is not" when comparing with None or type objects.
2000-12-12 23:20:45 +00:00
Fred Drake
b4e460ac4b
Avoid import of string module; it is only needed for expandvars().
...
Never assume that os.sep is for the module-specific platform; use the
right separator character directly.
Fix some minor style consistency nits.
2000-09-28 16:25:20 +00:00
Tim Peters
0eeba5b24b
Part of SF patch 101481: on Windows, os.path.join("a:", "b") should yield
...
"a:b", not "a:/b". Similar change was made to posixmodule.c earlier.
2000-09-19 20:39:32 +00:00
Skip Montanaro
623583165e
revert semantics of commonprefix to work character-by-character
2000-08-22 13:01:53 +00:00
Mark Hammond
647d2fe145
Fix for Bug #110673 : os.abspatth() now always returns os.getcwd() on Windows, if an empty path is specified. It previously did not if an empty path was delegated to win32api.GetFullPathName())
2000-08-14 06:20:32 +00:00
Skip Montanaro
1d3dd74574
* split on / or \
...
* case insensitive comparison
2000-07-17 03:06:58 +00:00
Skip Montanaro
4d5d5bf5ae
forgot to change copy.copy(m) to m[:]
2000-07-13 01:01:03 +00:00
Skip Montanaro
97bc98aea7
fixed semantics of commonprefix to work by path elements instead of
...
characters.
2000-07-12 16:55:57 +00:00
Fred Drake
162bd855a6
Fix bug #345 reported by David Bolen <db3l@fitlinxx.com>:
...
getatime() returned the mtime instead of the atime.
Similar to an old bug in posixpath.py.
2000-07-01 06:36:51 +00:00
Fred Drake
ef0b5dd080
Typo in a comment: "wheter" --> "whether"
2000-02-17 17:30:40 +00:00