On this page
posix.execv
Prev: posix.error | Up: posix | Next: posix.execve
Rel: posix.abort, posix.access, posix.chdir, posix.chflags
Ref: docs.python.org — posix.execv
Tags: #public #python3 #stdlib #posix
Import
import posix
from posix import execv
Signature & Overview
posix.execv(path, argv, /)
Execute an executable path with arguments, replacing current process.
Usage
import os
# Replaces the current process image with a new executable (never returns on success)
assert callable(os.execv)
Gotchas
- Does not return: Prefer
subprocess.run()unless intentionally replacing the current process.
REPL Inspect
from posix import execv
help(execv)
Linked from
Related notes
- tuts/python3/stdlib_module/posix/error Linked here; links to this page; shared tags: #posix, #stdlib
- tuts/python3/stdlib_module/posix/execve Linked here; links to this page; shared tags: #posix, #stdlib
- tuts/python3/stdlib_module/posix Linked here; links to this page; shared tags: #stdlib
- tuts/python3/stdlib_module/posix/abort Linked here; shared tags: #posix, #stdlib
- tuts/python3/stdlib_module/posix/access Linked here; shared tags: #posix, #stdlib
- tuts/python3/stdlib_module/posix/chdir Linked here; shared tags: #posix, #stdlib
- tuts/python3/stdlib_module/posix/chflags Linked here; shared tags: #posix, #stdlib
- tuts/python3/stdlib_module/posix/chmod shared tags: #posix, #stdlib
- tuts/python3/stdlib_module/posix/chown shared tags: #posix, #stdlib
- tuts/python3/stdlib_module/posix/chroot shared tags: #posix, #stdlib