MCPcopy
hub / github.com/pex-tool/pex / set_entry_point

Method set_entry_point

pex/pex_builder.py:312–326  ·  view source on GitHub ↗

Set the entry point of this PEX environment. :param entry_point: The entry point of the PEX in the form of ``module`` or ``module:symbol``, or ``None``. :type entry_point: string or None By default the entry point is None. The behavior of a ``None`` entry point i

(self, entry_point)

Source from the content-addressed store, hash-verified

310 )
311
312 def set_entry_point(self, entry_point):
313 """Set the entry point of this PEX environment.
314
315 :param entry_point: The entry point of the PEX in the form of ``module`` or ``module:symbol``,
316 or ``None``.
317 :type entry_point: string or None
318
319 By default the entry point is None. The behavior of a ``None`` entry point is dropping into
320 an interpreter. If ``module``, it will be executed via ``runpy.run_module``. If
321 ``module:symbol``, it is equivalent to ``from module import symbol; symbol()``.
322
323 The entry point may also be specified via ``PEXBuilder.set_executable``.
324 """
325 self._ensure_unfrozen("Setting an entry point")
326 self._pex_info.entry_point = entry_point
327
328 @property
329 def shebang(self):

Calls 1

_ensure_unfrozenMethod · 0.95