Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- >>> ============================== RESTART ==============================
- >>> import subprocess
- >>> import shlex
- >>> command_line = "ping -c 3 www.gentoo.org"
- >>> args = shlex.split(command_line)
- >>> try:
- subprocess.check_call(args,stdout=subprocess.PIPE, stderr=subprocess.PIPE)
- print "Gentoo dot org is up !"
- except subprocess.CalledProcessErorr:
- SyntaxError: invalid syntax
- >>>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement