Retourner au contenu associé (entrée de forum : Lancer une commande shell sous python?)
Posté par Sylvain le 30 mars 2005 à 15:37. En réponse au message Lancer une commande shell sous python?. Évalué à 2.
AltStyle によって変換されたページ (->オリジナル) / アドレス: モード: デフォルト 音声ブラウザ ルビ付き 配色反転 文字拡大 モバイル
# re
Posté par Sylvain . En réponse au message Lancer une commande shell sous python?. Évalué à 2.
import commands
u=commands.getoutput('commande')
et dans u tu as la string du retour de la commande.
En esperant t'avoir aidé :)