bundles / IPython 9.12.0 / IPython / core / history / HistoryManager / get_session_info
function
IPython.core.history:HistoryManager.get_session_info
source: /IPython/core/history.py :809
Signature
def get_session_info ( self , session : int = 0 ) → tuple[int, datetime.datetime, Optional[datetime.datetime], Optional[int], str] Summary
Get info about a session.
Parameters
session: intSession number to retrieve. The current session is 0, and negative numbers count back from current session, so -1 is the previous session.
Returns
session_id: intSession ID number
start: datetimeTimestamp for the start of the session.
end: datetimeTimestamp for the end of the session, or None if IPython crashed.
num_cmds: intNumber of commands run, or None if IPython crashed.
remark: strA manually set description.
Aliases
-
IPython.core.history.HistoryManager.get_session_info