I want to create sqlite3 databases from within a python script.
I am currently running this code which does not pass the right variable content to the sqlite3 command prompt, so I have one issue there.
I also do not want to have the user have an sqlite3 command shell open. I just want to define the db, and have the tables created and populated later by the py script.
I don't want to use a default sqlite3 db for this application, because I want to be able to save instances related to specific data sets.
import csv
import sqlite3 as lite
import os
con = None
def main():
choice = "chew"
filename=raw_input("enter the filename==> ")
current_db = filename[:-4]+'.db'
print("The filename minus the extention is " + filename[:-4])
print("This is the name of the current DB " + current_db)
os.system("sqlite3 $current_db")