ntpath
 

Common pathname manipulations, WindowsNT/95 version. 

Instead of importing this module directly, import os and refer to this
module as os.path.


 Modules
                                                                                                                                                                                                                               
os
stat
string


 Functions
                                                                                                                                                                                                                               
abspath(path)
Return the absolute version of a path
basename(p)
Returns the final component of a pathname
commonprefix(m)
Given a list of pathnames, returns the longest common leading component
dirname(p)
Returns the directory component of a pathname
exists(path)
Test whether a path exists
expanduser(path)
Expand ~ and ~user constructs.
If user or $HOME is unknown, do nothing.
expandvars(path)
Expand shell variables of form $var and ${var}.
Unknown variables are left unchanged.
getatime(filename)
Return the last access time of a file, reported by os.stat()
getmtime(filename)
Return the last modification time of a file, reported by os.stat()
getsize(filename)
Return the size of a file, reported by os.stat()
isabs(s)
Test whether a path is absolute
isdir(path)
Test whether a path is a directory
isfile(path)
Test whether a path is a regular file
islink(path)
Test for symbolic link.  On WindowsNT/95 always returns false
ismount(path)
Test whether a path is a mount point (defined as root of drive)
join(a, *p)
Join two or more pathname components, inserting "\" as needed
normcase(s)
Normalize case of pathname.
Makes all characters lowercase and all slashes into backslashes.
normpath(path)
Normalize path, eliminating double slashes, etc.
split(p)
Split a pathname.
Return tuple (head, tail) where tail is everything after the final slash.
Either part may be empty.
splitdrive(p)
Split a pathname into drive and path specifiers. Returns a 2-tuple
"(drive,path)";  either part may be empty
splitext(p)
Split the extension from a pathname.
Extension is everything from the last dot to the end.
Return (root, ext), either part may be empty.
splitunc(p)
Split a pathname into UNC mount point and relative path specifiers.
Return a 2-tuple (unc, rest); either part may be empty.
If unc is not empty, it has the form '//host/mount' (or similar
using backslashes).  unc+rest is always the input path.
Paths containing drive letters never have an UNC part.
walk(top, func, arg)
Directory tree walk whth callback function.
walk(top, func, args) calls func(arg, d, files) for each directory d 
in the tree rooted at top (including top itself); files is a list
of all the files and subdirs in directory d.