summaryrefslogtreecommitdiff
path: root/utils.py
diff options
context:
space:
mode:
authorHoraK-FDF <horak-fdf@web.de>2022-03-04 13:34:46 +0100
committerHoraK-FDF <horak-fdf@web.de>2022-03-04 13:34:46 +0100
commit8d97382f5eae70938dbeb490679114c8b85e5991 (patch)
treeb33d855366dd1c0a5fda926e5664a7e5e6d0ca10 /utils.py
parent728ba8aa6255fa2b8be2cfc759ba202a1a712504 (diff)
downloadmanachat-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-xutils.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/utils.py b/utils.py
index 0416a90..f05ece5 100755
--- a/utils.py
+++ b/utils.py
@@ -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!"