mirror of https://github.com/E-Almqvist/rmds
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
11 lines
290 B
11 lines
290 B
4 years ago
|
import sys
|
||
|
|
||
|
def get_value_of_key(key): # get the value of an input key, example: -c {VALUE}
|
||
|
for i in sys.argv:
|
||
|
if( i == key ):
|
||
|
return sys.argv[sys.argv.index(key) + 1]
|
||
|
return None # if no value was found return -1
|
||
|
|
||
|
def key_valid(key):
|
||
|
return key in sys.argv
|