diff options
author | HoraK-FDF <horak-fdf@web.de> | 2022-03-04 13:34:46 +0100 |
---|---|---|
committer | HoraK-FDF <horak-fdf@web.de> | 2022-03-04 13:34:46 +0100 |
commit | 8d97382f5eae70938dbeb490679114c8b85e5991 (patch) | |
tree | b33d855366dd1c0a5fda926e5664a7e5e6d0ca10 /utils.py | |
parent | 728ba8aa6255fa2b8be2cfc759ba202a1a712504 (diff) | |
download | manachat-8d97382f5eae70938dbeb490679114c8b85e5991.tar.gz manachat-8d97382f5eae70938dbeb490679114c8b85e5991.tar.bz2 manachat-8d97382f5eae70938dbeb490679114c8b85e5991.tar.xz manachat-8d97382f5eae70938dbeb490679114c8b85e5991.zip |
chat ignore and some fixes
Diffstat (limited to 'utils.py')
-rwxr-xr-x | utils.py | 13 |
1 files changed, 13 insertions, 0 deletions
@@ -148,3 +148,16 @@ def encode_str(value, size): output += chr(start) return output + +def preloadArray(nfile): + try: + array=[] + file = open(nfile, "r") + for x in file.readlines(): + x = x.replace("\n", "") + x = x.replace("\r", "") + array.append(x) + file.close() + return array + except: + print "preloadArray: File " + nfile + " not found!" |