Lines Matching refs:tmpfile
16 def updating_file_with_tmpfile(filename, tmpfile=None):
26 if not tmpfile:
27 tmpfile = filename + '.tmp'
28 elif os.path.isdir(tmpfile):
29 tmpfile = os.path.join(tmpfile, filename + '.tmp')
43 with open(tmpfile, 'w', newline=newline) as outfile:
46 update_file_with_tmpfile(filename, tmpfile)
49 def update_file_with_tmpfile(filename, tmpfile, *, create=False):
56 os.replace(tmpfile, filename)
60 with open(tmpfile, 'rb') as f:
65 os.replace(tmpfile, filename)
68 os.unlink(tmpfile)
78 parser.add_argument('tmpfile', help='path with new contents')