summaryrefslogtreecommitdiff
path: root/asciifarm/common
diff options
context:
space:
mode:
Diffstat (limited to 'asciifarm/common')
-rw-r--r--asciifarm/common/utils.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/asciifarm/common/utils.py b/asciifarm/common/utils.py
index 3df020c..729c85f 100644
--- a/asciifarm/common/utils.py
+++ b/asciifarm/common/utils.py
@@ -32,4 +32,9 @@ def writeFileSafe(filename, data, tempname=None):
with open(tempname, 'w') as f:
f.write(data)
os.rename(tempname, filename)
-
+
+
+def readFile(filepath):
+ with open(filepath, "r") as f:
+ text = f.read()
+ return text