Update installation instructions
[vchess.git] / server / db / dbconnect.py.dist
CommitLineData
4a209313
BA
1#!/usr/bin/env python
2
3import sqlite3
4from sqlite3 import Error
5
6vchess_db_path = "/path/to/vchess.sqlite"
7
8def create_connection():
9 """
10 Create a database connection to the vchess SQLite database
11 :return: Connection object or None
12 """
13
14 conn = None
15 try:
16 conn = sqlite3.connect(vchess_db_path)
17 except Error as e:
18 print(e)
19
20 return conn