def postcmd(self, stop, line): complete_line = readline.get_history_item(readline.get_current_history_length()) if complete_line.strip() != "": SessionManager().log_command(complete_line)