This is an old revision of the document!
Je débute en Python, je jette ici mes notes en vrac.
python3 -m venv ~/undossier source undossier/bin/activate
python -m venv undossier
.\undossier\Scripts\activate
nom_variable = "contenu variable"
f = open(nomfichier.txt, "w") f.write("blablabla") f.close
import datetime # Récupère la date courante date_now = datetime.datetime.now() # Formate la date au format AAAA-MM-DD HH:mm print(date_now.strftime("%Y-%m-%d %H:%M")) # Pour stocker dans une variable date = str(date_now.strftime("%Y-%m-%d %H:%M"))