Ejecutar un comando en python

Ejemplos de código

18
0

N

import os

os.system("ma Commande")

#Exemple:

os.system("cd Documents")
6
0

N

# press [windows] + [R] (on windows only)
# use the command : cd/the_way_of_your_program
# and now use this command :

py the_name_of_your_program.py 

# don't forget to write the extension (py for python) 
# at the end of your program name
3
0

N

import os
cmd = "git --version"
returned_value = os.system(cmd)  # returns the exit code in unix
0
0

N

python -m my_course.filter

En otros idiomas

Esta página está en otros idiomas

Русский
..................................................................................................................
English
..................................................................................................................
Italiano
..................................................................................................................
Polski
..................................................................................................................
Română
..................................................................................................................
한국어
..................................................................................................................
हिन्दी
..................................................................................................................
Français
..................................................................................................................
Türk
..................................................................................................................
Česk
..................................................................................................................
Português
..................................................................................................................
ไทย
..................................................................................................................
中文
..................................................................................................................
Slovenský
..................................................................................................................
Балгарскі
..................................................................................................................
Íslensk
..................................................................................................................