Last active
July 25, 2018 18:07
-
-
Save sdreher/d79c91ebc4ab6d97bfcfb8a57c21e5e7 to your computer and use it in GitHub Desktop.
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
import argparse | |
def main(args): | |
print(args.url) | |
def parse_arguments(): | |
parser = argparse.ArgumentParser(description="Accept arguments") | |
parser.add_argument('-url', '--url', required=True) | |
return parser.parse_args() | |
if __name__ == '__main__': | |
args = parse_arguments() | |
main(args) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
sample.py
python ./sample.py --url https://www.google.com