MCPcopy Index your code
hub / github.com/python-cmd2/cmd2 / in_script

Method in_script

cmd2/cmd2.py:2673–2675  ·  view source on GitHub ↗

Return whether a text script is running.

(self)

Source from the content-addressed store, hash-verified

2671 return Completions(error=formatted_exception)
2672
2673 def in_script(self) -> bool:
2674 """Return whether a text script is running."""
2675 return self._current_script_dir is not None
2676
2677 def in_pyscript(self) -> bool:
2678 """Return whether running inside a Python shell or pyscript."""

Callers 3

ppagedMethod · 0.95
hookMethod · 0.80
hookMethod · 0.80

Calls

no outgoing calls

Tested by 2

hookMethod · 0.64
hookMethod · 0.64