Created
August 31, 2015 08:06
-
-
Save looopTools/12952aa13c7d398c9e7e to your computer and use it in GitHub Desktop.
This file contains 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
def extract_arg(input_str): | |
start_i = input_str.index('=') + 1 | |
return input_str[start_i:] | |
def find_arg(arg, args): | |
for s in args: | |
if arg in s: | |
return extract_arg(s) | |
return None | |
website = 'http://127.0.0.1:4000/server' | |
if not find_arg('website', sys.argv) is None: | |
website = find_arg('website', sys.argv) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment