Commit | Line | Data |
---|---|---|
4a209313 BA |
1 | #!/usr/bin/env python |
2 | ||
3 | import sqlite3 | |
4 | from sqlite3 import Error | |
5 | ||
6 | vchess_db_path = "/path/to/vchess.sqlite" | |
7 | ||
8 | def 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 |