Action.py 614 B

12345678910111213141516171819202122
  1. """
  2. Fonction qui sort la valeur a une date précise
  3. """
  4. from Config.paths import *
  5. def listeAction():
  6. try:
  7. with open(Path_FichierAction, 'r') as file:
  8. actions = [line.strip() for line in file.readlines()]
  9. return actions
  10. except:
  11. print(f"Erreur listeAction: Le fichier {Path_FichierAction} est introuvable.")
  12. def NombreActionFichier():
  13. try:
  14. with open(Path_FichierAction, 'r') as file:
  15. actions = [line.strip() for line in file.readlines()]
  16. return (len(actions))
  17. except:
  18. print(f"Erreur NombreActionFichier: Le fichier {Path_FichierAction} est introuvable.")