MCPcopy Index your code
hub / github.com/python/cpython / set_executable

Method set_executable

Lib/multiprocessing/context.py:178–184  ·  view source on GitHub ↗

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.

(self, executable)

Source from the content-addressed store, hash-verified

176 from . import connection # noqa: F401
177
178 def set_executable(self, executable):
179 '''Sets the path to a python.exe or pythonw.exe binary used to run
180 child processes instead of sys.executable when using the 'spawn'
181 start method. Useful for people embedding Python.
182 '''
183 from .spawn import set_executable
184 set_executable(executable)
185
186 def set_forkserver_preload(self, module_names, *, on_error='ignore'):
187 '''Set list of module names to try to load in forkserver process.

Callers 1

test_set_executableMethod · 0.45

Calls 1

set_executableFunction · 0.85

Tested by 1

test_set_executableMethod · 0.36