python (3.12.0)
̑e d Z ddlZddlZddlmZ ddlmZ ddlmZ ddZ G d de Z
d Zed
k( r eej dd yy)
zA simple SQLite CLI for the sqlite3 module.
Apart from using 'argparse' for the command-line interface,
this module implements the REPL as a thin wrapper around
the InteractiveConsole class from the 'code' stdlib module.
N)ArgumentParser)InteractiveConsole)dedentc | j | D ]
}t | y# t j $ r}t | j
} t | d|j d| t j n/# t $ r# t | d| t j Y nw xY w|st j d Y d}~yY d}~yd}~ww xY w)zHelper that wraps execution of SQL code.
This is used both by the REPL and by direct execution from the CLI.
'c' may be a cursor or a connection.
'sql' is the SQL string to execute.
z (z): )filez: N)executeprintsqlite3Errortype__name__sqlite_errornamesysstderrAttributeErrorexit)csqlsuppress_errorsrowetps D/BuggyBox/python/3.12.0/bootstrap/lib/python3.12/sqlite3/__main__.pyr r s
99S>