MCPcopy Create free account
hub / github.com/ipython/ipython / end_session

Method end_session

IPython/core/history.py:572–579  ·  view source on GitHub ↗

Close the database session, filling in the end time and line count.

(self)

Source from the content-addressed store, hash-verified

570 self.session_number = cur.lastrowid
571
572 def end_session(self):
573 """Close the database session, filling in the end time and line count."""
574 self.writeout_cache()
575 with self.db:
576 self.db.execute("""UPDATE sessions SET end=?, num_cmds=? WHERE
577 session==?""", (datetime.datetime.now(),
578 len(self.input_hist_parsed)-1, self.session_number))
579 self.session_number = 0
580
581 def name_session(self, name):
582 """Give the current session a name in the history database."""

Callers 3

resetMethod · 0.95
atexit_operationsMethod · 0.80

Calls 2

writeout_cacheMethod · 0.95
executeMethod · 0.80

Tested by 1