This is a development version (9.14.0.dev) and may be unstable. Go to latest (9.13.0)
{ } Raw JSON

bundles / IPython 9.14.0.dev / IPython / core / history / HistoryManager / get_session_info

function

IPython.core.history:HistoryManager.get_session_info

source: /IPython/core/history.py :820

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 : int

Session 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 : int

Session ID number

start : datetime

Timestamp for the start of the session.

end : datetime

Timestamp for the end of the session, or None if IPython crashed.

num_cmds : int

Number of commands run, or None if IPython crashed.

remark : str

A manually set description.

Aliases

  • IPython.core.history.HistoryManager.get_session_info