Added a touch function to the file utils module.

This commit is contained in:
Jeremy Fincher 2005-04-04 06:01:17 +00:00
parent c8d114b9bc
commit 29fc5681d3

View File

@ -47,6 +47,10 @@ def readLines(filename):
return [line.rstrip('\r\n') for line in fd.readlines()]
finally:
fd.close()
def touch(filename):
fd = file(filename, 'w')
fd.close()
def mktemp(suffix=''):
"""Gives a decent random string, suitable for a filename."""