FreedomBox/plinth/util.py
2014-08-30 20:50:55 +05:30

9 lines
163 B
Python

def slurp(filespec):
with open(filespec) as x: f = x.read()
return f
def unslurp(filespec, msg):
with open(filespec, 'w') as x:
x.write(msg)