diff options
| author | troido <troido@hotmail.com> | 2018-01-01 16:55:58 +0100 |
|---|---|---|
| committer | troido <troido@hotmail.com> | 2018-01-01 16:55:58 +0100 |
| commit | 123edfd17cd9aa38d6d5e511a8c686d5d71ab140 (patch) | |
| tree | 0272a145ad0200d1405c345947d0a80559f5d269 /asciifarm/common | |
| parent | 38f3a3807373a19cacc0171dd7d5fd11f44dbd35 (diff) | |
made keybindings readable from an actual file
Diffstat (limited to 'asciifarm/common')
| -rw-r--r-- | asciifarm/common/utils.py | 7 |
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 |
