Created
October 4, 2018 21:09
-
-
Save RaulMedeiros/a3173a35b10eebcc5e121e187fcd4ed1 to your computer and use it in GitHub Desktop.
argparse_samples
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['asterisk_ip']) | |
return True | |
if __name__ == '__main__': | |
# Asterisk arguments | |
parser = argparse.ArgumentParser(description='LockTech Gate Access Controller 1.0') | |
parser.add_argument('--asterisk_ip', default="10.110.1.204", type=str) | |
parser.add_argument('--my_port', default=5080, type=int) | |
args = vars(parser.parse_args()) | |
main(args) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment