Ci-dessous, les différences entre deux révisions de la page.
Les deux révisions précédentes Révision précédente Prochaine révision | Révision précédente | ||
python:windows [2021/06/12 07:19] marclebrun [Générer un exécutable] |
python:windows [2022/11/25 08:11] (Version actuelle) marclebrun [Générer un exécutable] |
||
---|---|---|---|
Ligne 84: | Ligne 84: | ||
</code> | </code> | ||
- | ===== Générer un exécutable ===== | ||
- | |||
- | Doc de **PyInstaller** : [[https://www.pyinstaller.org/]] | ||
- | |||
- | Didacticiel : [[https://medium.com/lifeandtech/executable-gui-with-python-fc79562a5558|Executable GUI with Python. using Tkinter and Pyinstaller]] | ||
- | |||
- | Installer **PyInstaller** dans l'environnement virtuel du projet : | ||
- | |||
- | <code dos> | ||
- | (venv) c:\monprojet> pip install pyinstaller | ||
- | </code> | ||
- | |||
- | Programme d'exemple, une fenêtre vide en **Tk** : | ||
- | |||
- | <code python> | ||
- | import tkinter as tk | ||
- | |||
- | window = tk.Tk() | ||
- | window.title("My First Program") | ||
- | |||
- | window.mainloop() | ||
- | |||
- | </code> | ||