Bienvenue à cette formation parisienne !
Allons voir ici.
En ce vendredi (13!) :
Comme promis, une substitution de commandes :
1 #! /usr/bin/env python3
2 import subprocess
3 def laDate():
4 dothis = "date" # la commande Unix
5 temp = subprocess.getoutput(dothis) # le résultat
6 return temp
7 if __name__ == '__main__':
8 print(laDate())
© Yves Guidet jeudi 9 juillet 2020, 09:48:17 (UTC+0200) (bella ubuntu, site printemps) yves.guidet@gmail.com