On this page
  1. ntpath.normpath
  2. Import
  3. Signature & Overview
  4. Usage
  5. Gotchas
  6. REPL Inspect

ntpath.normpath

Prev: ntpath.normcase | Up: ntpath | Next: ntpath.realpath
Rel: ntpath.abspath, ntpath.basename, ntpath.commonpath, ntpath.commonprefix
Ref: docs.python.org — ntpath.normpath
Tags: #public #python3 #stdlib #ntpath


Import

import ntpath
from ntpath import normpath

Signature & Overview

ntpath.normpath(path)

Normalize path, eliminating double slashes, etc.

Usage

import ntpath

assert ntpath.normpath(r'C:\a\b\..\c') == r'C:\a\c'

Gotchas

REPL Inspect

from ntpath import normpath
help(normpath)

Linked from

Related notes