From ce0a8fff5938fc0d3ef5e76abb2d6ea287ebe291 Mon Sep 17 00:00:00 2001 From: carnal0wnage Date: Mon, 23 Apr 2018 22:56:10 -0400 Subject: [PATCH] get the db_name into those files the new way --- create_dbs.py | 13 +++++++++++-- test_insert.py | 3 +++ 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/create_dbs.py b/create_dbs.py index 4746c5a..b09248e 100644 --- a/create_dbs.py +++ b/create_dbs.py @@ -1,10 +1,19 @@ +''' +Create the sqlite3 database for WeirdAAL +''' + +import builtins import sqlite3 from sqlite3 import Error -from libs.sql import * +from libs.sql import * -#create some tables to stick data in + +# Provides us with a global var "db_name" we can access anywhere +builtins.db_name = "weirdAAL.db" + +# create some tables to stick data in if __name__ == "__main__": create_awskey_table(db_name, "AWSKey") diff --git a/test_insert.py b/test_insert.py index 72a15c7..15565d8 100644 --- a/test_insert.py +++ b/test_insert.py @@ -1,9 +1,12 @@ +import builtins import datetime import sqlite3 from sqlite3 import Error from libs.sql import * +# Provides us with a global var "db_name" we can access anywhere +builtins.db_name = "weirdAAL.db" #create some tables to stick data in