The nt Module

(Implementation, Windows only) The nt module is an implementation module used by the os module on Windows platforms. There’s hardly any reason to use this module directly; use os instead. Example 12-16 shows its use.

Example 12-16. Using the nt Module

File: nt-example-1.py

import nt

# in real life, use os.listdir and os.stat instead!
for file in nt.listdir("."):
    print file, nt.stat(file)[6]

aifc-example-1.py 314
anydbm-example-1.py 259
array-example-1.py 48

Get Python Standard Library now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.