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

posixpath.normpath

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


Import

import posixpath
from posixpath import normpath

Signature & Overview

posixpath.normpath(path)

Normalize path, eliminating double slashes, etc.

Usage

import posixpath

assert posixpath.normpath('/a/b/../c/') == '/a/c'

Gotchas

REPL Inspect

from posixpath import normpath
help(normpath)

Linked from

Related notes