parameters: (self)
docstring: Close the database session, filling in the end time and line count.
docstring_summary: Close the database session, filling in the end time and line count.
docstring_tokens: Close the database session filling in the end time and line count .
function: def end_session(self):
          """Close the database session, filling in the end time and line count."""
          self.writeout_cache()
          with self.db:
              self.db.execute("""UPDATE sessions SET end=?, num_cmds=? WHERE
                              session==?""", (datetime.datetime.now(),
                              len(self.input_hist_parsed)-1, self.session_number))
          self.session_number = 0
function_tokens: def end_session ( self ) : self . writeout_cache ( ) with self . db : self . db . execute ( """UPDATE sessions SET end=?, num_cmds=? WHERE
                              session==?""" , ( datetime . datetime . now ( ) , len ( self . input_hist_parsed ) - 1 , self . session_number ) ) self . session_number = 0