On this page
tempfile.gettempdirb
Prev: tempfile.gettempdir | Up: tempfile | Next: tempfile.gettempprefix
Rel: tempfile.gettempdir, tempfile.gettempprefix, tempfile.gettempprefixb, tempfile.mkdtemp
Ref: docs.python.org — tempfile.gettempdirb
Tags: #public #python3 #stdlib #tempfile
Import
import tempfile
from tempfile import gettempdirb
Signature & Overview
tempfile.gettempdirb()
Returns tempfile.tempdir as bytes.
Usage
import tempfile
raw_dir = tempfile.gettempdirb()
assert isinstance(raw_dir, bytes) and len(raw_dir) > 0
Gotchas
- Bytes counterpart to
gettempdir(): Use when interacting with low-level OS APIs that operate onbytespaths; otherwise prefergettempdir().
REPL Inspect
from tempfile import gettempdirb
help(gettempdirb)
Linked from
- tuts/python3/stdlib_module/tempfile
- tuts/python3/stdlib_module/tempfile/gettempdir
- tuts/python3/stdlib_module/tempfile/gettempprefix
- tuts/python3/stdlib_module/tempfile/gettempprefixb
- tuts/python3/stdlib_module/tempfile/mkdtemp
- tuts/python3/stdlib_module/tempfile/mkstemp
- tuts/python3/stdlib_module/tempfile/mktemp
- tuts/python3/stdlib_module/tempfile/NamedTemporaryFile
- tuts/python3/stdlib_module/tempfile/SpooledTemporaryFile
- tuts/python3/stdlib_module/tempfile/TemporaryDirectory
- tuts/python3/stdlib_module/tempfile/TemporaryFile
Related notes
- tuts/python3/stdlib_module/tempfile/gettempdir Linked here; links to this page; shared tags: #stdlib, #tempfile
- tuts/python3/stdlib_module/tempfile/gettempprefix Linked here; links to this page; shared tags: #stdlib, #tempfile
- tuts/python3/stdlib_module/tempfile/gettempprefixb Linked here; links to this page; shared tags: #stdlib, #tempfile
- tuts/python3/stdlib_module/tempfile/mkdtemp Linked here; links to this page; shared tags: #stdlib, #tempfile
- tuts/python3/stdlib_module/tempfile Linked here; links to this page; shared tags: #stdlib
- tuts/python3/stdlib_module/tempfile/mkstemp links to this page; shared tags: #stdlib, #tempfile
- tuts/python3/stdlib_module/tempfile/mktemp links to this page; shared tags: #stdlib, #tempfile
- tuts/python3/stdlib_module/tempfile/NamedTemporaryFile links to this page; shared tags: #stdlib, #tempfile
- tuts/python3/stdlib_module/tempfile/SpooledTemporaryFile links to this page; shared tags: #stdlib, #tempfile
- tuts/python3/stdlib_module/tempfile/TemporaryDirectory links to this page; shared tags: #stdlib, #tempfile