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

multiprocessing.set_executable

Prev: multiprocessing.Semaphore | Up: multiprocessing | Next: multiprocessing.set_forkserver_preload
Rel: multiprocessing.active_children, multiprocessing.allow_connection_pickling, multiprocessing.Array, multiprocessing.AuthenticationError
Ref: docs.python.org — multiprocessing.set_executable
Tags: #public #python3 #stdlib #multiprocessing


Import

import multiprocessing
from multiprocessing import set_executable

Signature & Overview

multiprocessing.set_executable(executable)

Sets the path to a python.exe or pythonw.exe binary used to run child processes instead of sys.executable when using the 'spawn' start method. Useful for people embedding Python.

Usage

import multiprocessing as mp
import sys

# Points spawned child processes to a specific Python interpreter (useful when embedding Python)
assert callable(mp.set_executable) and bool(sys.executable)

Gotchas

REPL Inspect

from multiprocessing import set_executable
help(set_executable)

Linked from

Related notes