Create creatopenAutoDB.py

This commit is contained in:
James Devine 2017-10-29 18:58:01 +01:00 committed by GitHub
parent 2fd7e1f9df
commit 065acd7fe8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -0,0 +1,16 @@
import sqlite3
from sqlite3 import Error
def create_connection(db_file):
""" create a database connection to a SQLite database """
try:
conn = sqlite3.connect(db_file)
print(sqlite3.version)
except Error as e:
print(e)
finally:
conn.close()
if __name__ == '__main__':
create_connection("/home/pi/openAutoDB/openAuto.db")