today i was making a personal project, a voice assistant, when i coded the block that opens the config.ini file. I used the configparser library. Anyways, when i check if it is the first time that the program is run, it will always return that it is not the first time the program has been run.
Python Block Code:
def fsCheck():
parser = ConfigParser()
parser.read("config/config.ini")
fs = parser.get("ai","first_start")
if(fs == 1):
print(True)
else:
print(False)
Config File
[ai]
first_start = 1
Aucun commentaire:
Enregistrer un commentaire