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

nturl2path.url2pathname

Prev: nturl2path.pathname2url | Up: nturl2path
Rel: nturl2path.pathname2url
Ref: docs.python.org — nturl2path.url2pathname
Tags: #public #python3 #stdlib #nturl2path


Import

import nturl2path
from nturl2path import url2pathname

Signature & Overview

nturl2path.url2pathname(url)

OS-specific conversion from a relative URL of the 'file' scheme to a file system path; not recommended for general use.

Usage

import nturl2path

assert nturl2path.url2pathname("///C:/Users/Ada/a.txt") == r"C:\Users\Ada\a.txt"

Gotchas

REPL Inspect

from nturl2path import url2pathname
help(url2pathname)

Linked from

Related notes