Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import os
- import subprocess
- a = open(os.devnull,'w')
- p = subprocess.call(['ping','-c','2','1.1.1.1'],stdout=a,stderr=subprocess.STDOUT)
- if p == 1:
- print("El comando se ejecuto correctamente")
- else:
- print("Falló la ejecucion del comando")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement