summaryrefslogtreecommitdiffstats
path: root/Lib/ntpath.py
Commit message (Collapse)AuthorAgeFilesLines
* Add Py3k warnings to os.path.walkBenjamin Peterson2008-05-091-1/+3
|
* Patch #2167 from calvin: Remove unused importsChristian Heimes2008-02-231-1/+1
|
* #1742: don't raise exception on os.path.relpath("a", "a"), but return os.curdir.Georg Brandl2008-01-061-0/+2
| | | | Reported by Jesse Towner.
* #1696393: don't check for '.' and '..' in ntpath.walk sinceGeorg Brandl2008-01-061-5/+3
| | | | | they aren't returned from os.listdir anymore. Reported by Michael Haggerty.
* Bug #1688564: document os.path.join's absolute path behavior in the docstring.Georg Brandl2007-08-231-1/+3
|
* Patch 1339796: add a relpath() function to os.path.Collin Winter2007-03-161-1/+27
|
* Patch #957650: "%var%" environment variable references are now properlyGeorg Brandl2007-03-131-16/+42
| | | | | expanded in ntpath.expandvars(), also "~user" home directory references are recognized and handled on Windows.
* Bug #1115886: os.path.splitext('.cshrc') gives now ('.cshrc', '').Martin v. Löwis2007-03-071-10/+3
|
* Fixed ntpath.expandvars to not replace references to non-existingSjoerd Mullender2007-01-161-2/+6
| | | | | variables with nothing. Also added tests. This fixes bug #494589.
* - Move functions common to all path modules into genericpath.py and have theJack Diederich2006-08-261-72/+5
| | | | | OS speicifc path modules import them. - Have os2emxpath import common functions fron ntpath instead of using copies
* SF bug #1473760 TempFile can hang on Windows.Tim Peters2006-04-211-21/+22
| | | | | | | | | | | | | | | | | | | | | | | | Python 2.4 changed ntpath.abspath to do an import inside the function. As a result, due to Python's import lock, anything calling abspath on Windows (directly, or indirectly like tempfile.TemporaryFile) hung when it was called from a thread spawned as a side effect of importing a module. This is a depressingly frequent problem, and deserves a more general fix. I'm settling for a micro-fix here because this specific one accounts for a report of Zope Corp's ZEO hanging on Windows, and it was an odd way to change abspath to begin with (ntpath needs a different implementation depending on whether we're actually running on Windows, and the _obvious_ way to arrange for that is not to bury a possibly-failing import _inside_ the function). Note that if/when other micro-fixes of this kind get made, the new Lib/test/threaded_import_hangers.py is a convenient place to add tests for them.
* Bug #1266283: lexists() is not exported from os.pathGeorg Brandl2005-08-221-4/+4
|
* patch [ 1105730 ] Faster commonprefix in macpath, ntpath, etc.Georg Brandl2005-08-031-8/+7
|
* Patch #941486: add os.path.lexists(). Also fix bug #940578 by using lexists ↵Johannes Gijsbers2004-08-301-1/+2
| | | | in glob.glob.
* Make ntpath compress multiple slashes between drive letter and the rest of theBrett Cannon2004-07-101-3/+19
| | | | | | path. Also clarifies UNC handling and adds appropriate tests. Applies patch #988607 to fix bug #980327. Thanks Paul Moore.
* Feature request #935915: Add os.path.devnull.Martin v. Löwis2004-06-081-1/+2
|
* Fix a bunch of typos in documentation, docstrings and comments.Walter Dörwald2003-10-201-1/+1
| | | | (From SF patch #810751)
* make nt altsep forward slash - closes bug 709428Skip Montanaro2003-03-281-1/+1
| | | | backport candidate
* Tweak to Skip's checkin of patch 686397:Andrew MacIntyre2003-02-171-3/+2
| | | | | | - 'os2' references in ntpath.py relate to the VACPP port, not the EMX port; - the VACPP port uses the same defpath as all other ntpath.py supported platforms except 'ce'.
* Migrate definitions of several platform-dependent path-related variablesSkip Montanaro2003-02-141-0/+16
| | | | into the relevant path modules. See patch #686397.
* Fix SF #659228, 'realpath' function missing from os.pathNeal Norwitz2003-01-031-1/+1
| | | | | | | Also added realpath = abspath for os2emx, similar to windows/mac which also don't really implement realpath. Backport candidate, I think?
* Patch #658927: Add getctime to os.path.Martin v. Löwis2002-12-311-1/+4
| | | | Document that getatime and getmtime may return floats.
* Patch #536661: Improve performance of splitext. Add test_macpath.Martin v. Löwis2002-12-121-14/+6
|
* Don't try to access sys.getwindowsversion unless it exists (ntpath isTim Peters2002-10-091-1/+2
| | | | | | imported on systems other than Windows, and in particular is imported by test___all__; the compile farm reported that all Linux tests failed due to this; isn't anyone in PythonDevLand running CVS on Linux?!).
* Add os.path.supports_unicode_filenames for all platforms,Mark Hammond2002-10-081-1/+5
| | | | | | sys.getwindowsversion() on Windows (new enahanced Tim-proof <wink> version), and fix test_pep277.py in a few minor ways. Including doc and NEWS entries.
* Replaced obsolete stat module constants with equivalent attributesRaymond Hettinger2002-06-011-8/+5
|
* SF 563203. Replaced 'has_key()' with 'in'.Raymond Hettinger2002-06-011-4/+4
|
* Partial introduction of bools where appropriate.Guido van Rossum2002-04-071-3/+3
|
* Convert a pile of obvious "yes/no" functions to return bool.Tim Peters2002-04-041-2/+2
|
* Allow abspath to still do something sensisble if the nt module can not be ↵Mark Hammond2002-01-171-1/+11
| | | | imported.
* SF bug 478425: Change in os.path.join (ntpath.py)Tim Peters2001-11-051-0/+6
| | | | | | 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.
* SF bug [#469732] os.path.walk docstring inconsistent.Tim Peters2001-10-101-4/+13
| | | | | 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!
* SF patch #461781 by Chris Lawrence: os.path.realpath - Resolve symlinks:Guido van Rossum2001-09-171-0/+3
| | | | | | | | | | | | | | 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'
* SF bug #456621: normpath on Win32 not collapsing c:\\..Tim Peters2001-08-301-8/+11
| | | | | | 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.
* One more crack at join(): stop trying to pretend this isn't a mass ofTim Peters2001-07-271-16/+40
| | | | special cases. test_pkg works again on Windows.
* Change ntpath.join() so that join("d:/", "/whatever") returnsTim Peters2001-07-261-5/+6
| | | | | | | 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!
* Use string.ascii_letters instead of string.letters (SF bug #226706).Fred Drake2001-07-201-1/+1
|
* SF bug #44271: os.path.expanduser problem w/o HOME set.Tim Peters2001-07-191-6/+16
| | | | | | | 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.
* abspath(): Fix inconsistent indentation.Fred Drake2001-05-151-1/+1
|
* Add support for Windows using "mbcs" as the default Unicode encoding when ↵Mark Hammond2001-05-131-13/+4
| | | | dealing with the file system. As discussed on python-dev and in patch 410465.
* added several more __all__ listsSkip Montanaro2001-02-061-0/+4
|
* Whitespace normalization.Tim Peters2001-01-151-3/+3
|
* Update the code to better reflect recommended style:Fred Drake2000-12-121-3/+3
| | | | | Use != instead of <> since <> is documented as "obsolescent". Use "is" and "is not" when comparing with None or type objects.
* Avoid import of string module; it is only needed for expandvars().Fred Drake2000-09-281-22/+21
| | | | | | Never assume that os.sep is for the module-specific platform; use the right separator character directly. Fix some minor style consistency nits.
* Part of SF patch 101481: on Windows, os.path.join("a:", "b") should yieldTim Peters2000-09-191-1/+1
| | | | "a:b", not "a:/b". Similar change was made to posixmodule.c earlier.
* revert semantics of commonprefix to work character-by-characterSkip Montanaro2000-08-221-8/+3
|
* Fix for Bug #110673: os.abspatth() now always returns os.getcwd() on ↵Mark Hammond2000-08-141-4/+7
| | | | Windows, if an empty path is specified. It previously did not if an empty path was delegated to win32api.GetFullPathName())
* * split on / or \Skip Montanaro2000-07-171-3/+5
| | | | * case insensitive comparison
* forgot to change copy.copy(m) to m[:]Skip Montanaro2000-07-131-2/+2
|
* fixed semantics of commonprefix to work by path elements instead ofSkip Montanaro2000-07-121-4/+7
| | | | characters.