mirror of
https://github.com/Mikaela/Limnoria.git
synced 2025-02-18 14:40:51 +01:00
Added a touch function to the file utils module.
This commit is contained in:
parent
c8d114b9bc
commit
29fc5681d3
@ -47,6 +47,10 @@ def readLines(filename):
|
|||||||
return [line.rstrip('\r\n') for line in fd.readlines()]
|
return [line.rstrip('\r\n') for line in fd.readlines()]
|
||||||
finally:
|
finally:
|
||||||
fd.close()
|
fd.close()
|
||||||
|
|
||||||
|
def touch(filename):
|
||||||
|
fd = file(filename, 'w')
|
||||||
|
fd.close()
|
||||||
|
|
||||||
def mktemp(suffix=''):
|
def mktemp(suffix=''):
|
||||||
"""Gives a decent random string, suitable for a filename."""
|
"""Gives a decent random string, suitable for a filename."""
|
||||||
|
Loading…
x
Reference in New Issue
Block a user