On this page
ntpath.samestat
Prev: ntpath.sameopenfile | Up: ntpath | Next: ntpath.split
Rel: ntpath.abspath, ntpath.basename, ntpath.commonpath, ntpath.commonprefix
Ref: docs.python.org — ntpath.samestat
Tags: #public #python3 #stdlib #ntpath
Import
import ntpath
from ntpath import samestat
Signature & Overview
ntpath.samestat(s1, s2)
Test whether two stat buffers reference the same file
Usage
import ntpath, os
s = os.stat('.')
assert ntpath.samestat(s, s) is True
Gotchas
- Compares two
os.stat_resultobjects directly.
REPL Inspect
from ntpath import samestat
help(samestat)
Linked from
Related notes
- tuts/python3/stdlib_module/ntpath/sameopenfile Linked here; links to this page; shared tags: #ntpath, #stdlib
- tuts/python3/stdlib_module/ntpath/split Linked here; links to this page; shared tags: #ntpath, #stdlib
- tuts/python3/stdlib_module/ntpath Linked here; links to this page; shared tags: #stdlib
- tuts/python3/stdlib_module/ntpath/abspath Linked here; shared tags: #ntpath, #stdlib
- tuts/python3/stdlib_module/ntpath/basename Linked here; shared tags: #ntpath, #stdlib
- tuts/python3/stdlib_module/ntpath/commonpath Linked here; shared tags: #ntpath, #stdlib
- tuts/python3/stdlib_module/ntpath/commonprefix Linked here; shared tags: #ntpath, #stdlib
- tuts/python3/stdlib_module/ntpath/dirname shared tags: #ntpath, #stdlib
- tuts/python3/stdlib_module/ntpath/exists shared tags: #ntpath, #stdlib
- tuts/python3/stdlib_module/ntpath/expanduser shared tags: #ntpath, #stdlib