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

Method start_session

cmd2/history.py:157–159  ·  view source on GitHub ↗

Start a new session, thereby setting the next index as the first index in the new session.

(self)

Source from the content-addressed store, hash-verified

155 self.session_start_index = 0
156
157 def start_session(self) -> None:
158 """Start a new session, thereby setting the next index as the first index in the new session."""
159 self.session_start_index = len(self)
160
161 def _zero_based_index(self, onebased: int | str) -> int:
162 """Convert a one-based index to a zero-based index."""

Callers 3

clearMethod · 0.95
persisted_histFunction · 0.95
_initialize_historyMethod · 0.80

Calls

no outgoing calls

Tested by 1

persisted_histFunction · 0.76