pydoc > ntpath

📛 NAME

ntpath - Common pathname manipulations, WindowsNT/95 version.

🚀 Quick Reference

Use CaseCommandDescription
Join pathsjoin('c:\\foo', 'bar')Combine path components using Windows separator
Get base namebasename('c:\\foo\\bar.txt')Return final component 'bar.txt'
Get directory namedirname('c:\\foo\\bar.txt')Return directory 'c:\\foo'
Check existenceexists('c:\\foo')Test whether path exists (ignoring broken links)
Normalise pathnormpath('c:\\foo\\..\\bar')Resolve double slashes and dots
Split extensionsplitext('file.txt')Extract root and extension as tuple
Get absolute pathabspath('..\\bar')Return fully resolved absolute path
Expand userexpanduser('~\\Documents')Replace ~ with user's home directory

📚 MODULE REFERENCE

https://docs.python.org/3.10/library/ntpath.html

The following documentation is automatically generated from the Python source files. It may be incomplete, incorrect or include features that are considered implementation detail and may vary between Python implementations. When in doubt, consult the module reference at the location listed above.

📖 DESCRIPTION

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

📋 FUNCTIONS

📦 DATA

__all__ = ['normcase', 'isabs', 'join', 'splitdrive', 'split', 'splitext',
           'basename', 'dirname', 'commonprefix', 'getsize', 'getmtime',
           'getatime', 'getctime', 'islink', 'exists', 'lexists', 'isdir', 'isfile',
           'ismount', 'expanduser', 'expandvars', 'normpath', 'abspath',
           'samefile', 'sameopenfile', 'samestat', 'realpath']
altsep = '/'
curdir = '.'
defpath = r'.;C:\bin'
devnull = 'nul'
extsep = '.'
pardir = '..'
pathsep = ';'
sep = r'\\'
supports_unicode_filenames = False

📁 FILE

/usr/lib/python3.10/ntpath.py

ntpath
📛 NAME 🚀 Quick Reference 📚 MODULE REFERENCE 📖 DESCRIPTION 📋 FUNCTIONS 📦 DATA 📁 FILE

Generated by phpman v4.10.0-7-g98e9fd5 · Markdown · JSON · MCP Author: Che Dong Under GNU General Public License
2026-09-05 01:16 @216.73.217.1
CrawledBy Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)
Valid XHTML 1.0 Transitional!Valid CSS!

^_top_^