Created
December 11, 2019 05:51
-
-
Save ekiara/c008d0cee59ece5c262ff2a489eb6ac5 to your computer and use it in GitHub Desktop.
Invoking shell commands from Python and subprocess (either in the Python interpreter, or in a Python scipt)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Invoking shell commands from Python and subprocess (either in the Python interpreter, or in a Python scipt) # | |
# python-subprocess-invoking-shell-commands # | |
>>> import subprocess | |
>>> subprocess.call(["whois", "example.co.ke"]) | |
>>> subprocess.call(["whois", "-h" "registry.kenic.or.ke", "example.co.ke"]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment