• PYTHON > exécuter un script dans un terminal

      1 - par l’interpréteur

      Python 2:

      python fichier.py

       

      Python 3:

      python3 fichier.py

      2 - le script appelle l’interpréteur

      Au tout début du script :

       

      #!/usr/bin/env python3

       

      Le rendre exécutable :

       

       chmod +x fichier.py

       

      Et le lancer avec :

       

      ./fichier.py

 

Aucun commentaire

 

Laissez un commentaire