import os import psycopg2 from constants import CONST_LogsFolder, CONST_DatabaseFolder def initScript(): currentPath = os.getcwd() #logsPath = currentPath + CONST_LogsFolder() logsPath = os.path.join(currentPath, CONST_LogsFolder()) #databasePath = currentPath + CONST_DatabaseFolder() databasePath = os.path.join(currentPath, CONST_DatabaseFolder()) logMessage = "[INFO] Creating the folders " + logsPath + " and " + databasePath + " if they don't exist..." print(logMessage) if not os.path.exists(logsPath): os.makedirs(logsPath) if not os.path.exists(databasePath): os.makedirs(databasePath)