Prev Next create_connection

@(@\newcommand{\B}[1]{ {\bf #1} } \newcommand{\R}[1]{ {\rm #1} } \newcommand{\W}[1]{ \; #1 \; }@)@This is dismod_at-20221105 documentation: Here is a link to its current documentation .
Create a Python sqlite3 Database Connection

Syntax
file_name
new
connection

Syntax
connection = dismod_at.create_connection(file_namenew)

file_name
is as str containing the name of the file where the data base is stored. If the file does not exist, an error message is printed and the program is terminated with a non-zero error status.

new
is either True or False. If it is true, and a data base with the same name already exists, the existing database is deleted before creating the connection.

connection
The return value is an sqlite3 connection object You must close this connection when you are done with it by executing
 
connection.close()

Input File: python/dismod_at/create_connection.py