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

posixpath.splitdrive

Prev: posixpath.split | Up: posixpath | Next: posixpath.splitext
Rel: posixpath.abspath, posixpath.basename, posixpath.commonpath, posixpath.commonprefix
Ref: docs.python.org — posixpath.splitdrive
Tags: #public #python3 #stdlib #posixpath


Import

import posixpath
from posixpath import splitdrive

Signature & Overview

posixpath.splitdrive(p)

Split a pathname into drive and path. On Posix, drive is always empty.

Usage

import posixpath

assert posixpath.splitdrive('/a/b') == ('', '/a/b')

Gotchas

REPL Inspect

from posixpath import splitdrive
help(splitdrive)

Linked from

Related notes