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

posix.fspath

Prev: posix.fpathconf | Up: posix | Next: posix.fstat
Rel: posix.abort, posix.access, posix.chdir, posix.chflags
Ref: docs.python.org — posix.fspath
Tags: #public #python3 #stdlib #posix


Import

import posix
from posix import fspath

Signature & Overview

posix.fspath(path)

Return the file system path representation of the object.

Usage

import os
from pathlib import Path

assert os.fspath(Path('a/b')) == 'a/b'

Gotchas

REPL Inspect

from posix import fspath
help(fspath)

Linked from

Related notes