feat: extract code in root index
This commit is contained in:
parent
86131c796e
commit
41e51b69af
3 changed files with 16 additions and 16 deletions
|
@ -3,5 +3,5 @@ prices = {
|
|||
'card_exte': 20
|
||||
}
|
||||
|
||||
db_path = '../db/baseFilms.db'
|
||||
migrations_db = '../db/migrations'
|
||||
db_path = './db/baseFilms.db'
|
||||
migrations_db = './db/migrations'
|
||||
|
|
11
index.py
Normal file
11
index.py
Normal file
|
@ -0,0 +1,11 @@
|
|||
from scripts.ccInterface import FilmInterface
|
||||
|
||||
fi = FilmInterface()
|
||||
try:
|
||||
fi.main()
|
||||
except EOFError:
|
||||
print("\nCtrl-D : Sortie du programme")
|
||||
pass
|
||||
#except:
|
||||
# fi.main()
|
||||
# pass
|
|
@ -12,8 +12,8 @@ import os
|
|||
# * mettre en place une file d'instruction pour anticiper
|
||||
# * vérifier les eval et les types donnés
|
||||
|
||||
from genCom import GenerateurComm
|
||||
from cineclubBlogSQ import filmSQ as f
|
||||
from scripts.genCom import GenerateurComm
|
||||
from scripts.cineclubBlogSQ import filmSQ as f
|
||||
from config import migrations_db, db_path
|
||||
import sqlite3
|
||||
|
||||
|
@ -102,7 +102,7 @@ class FilmInterface():
|
|||
def corrigerFilm(self):
|
||||
if self.filmCharge:
|
||||
# recuperer les cles possibles
|
||||
conn = sqlite3.connect("../db/baseFilms.db")
|
||||
conn = sqlite3.connect(db_path)
|
||||
conn.row_factory = sqlite3.Row
|
||||
c = conn.cursor()
|
||||
try:
|
||||
|
@ -203,14 +203,3 @@ class FilmInterface():
|
|||
def main(self):
|
||||
self.menu()
|
||||
pass
|
||||
|
||||
|
||||
fi = FilmInterface()
|
||||
try:
|
||||
fi.main()
|
||||
except EOFError:
|
||||
print("\nCtrl-D : Sortie du programme")
|
||||
pass
|
||||
#except:
|
||||
# fi.main()
|
||||
# pass
|
||||
|
|
Loading…
Reference in a new issue