@contextmanager
def make_tempfile(name):
 f = open(name, 'w')
 f.close()
 try:
  (yield)
 finally:
  os.unlink(name)

@ contextmanager def make_tempfile ( name ) : f = open ( name , 'w' ) f . close ( ) try : ( yield ) finally : os . unlink ( name )
create an empty .