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
@ -48,6 +48,10 @@ def readLines(filename):
|
|||||||
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."""
|
||||||
r = random.Random()
|
r = random.Random()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user