Initial commit

fetchIP
E. Almqvist 4 years ago
commit 8ff43fe33a
  1. 2
      .gitignore
  2. 10
      lib/input.py
  3. 17
      lib/vars.py

2
.gitignore vendored

@ -0,0 +1,2 @@
username.txt
lib/__pycache__/

@ -0,0 +1,10 @@
import sys
def getValueOfKey(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 -1 # if no value was found return -1
def inputHasKeys(keyList):
return all(key in sys.argv for key in keyList)

@ -0,0 +1,17 @@
eng_alphabet = *"abcdefghijklmnopqrstuvwxyz",
swe_alphabet = *"abcdefghijklmnopqrstuvwxyzåäö",
# Definitions
alphabet = dict()
alphabet["ENG"] = eng_alphabet
alphabet["SWE"] = swe_alphabet
# Functions
def listToString( l ):
returnStr = ""
for char in l:
returnStr += char
return returnStr
Loading…
Cancel
Save