@contextmanager
def temporary_file_path(root_dir=None, cleanup=True, suffix=u'', permissions=None):
 with temporary_file(root_dir, cleanup=cleanup, suffix=suffix, permissions=permissions) as fd:
  fd.close()
  (yield fd.name)

@ contextmanager def temporary_file_path ( root_dir = None , cleanup = True , suffix = u'' , permissions = None ) : with temporary_file ( root_dir , cleanup = cleanup , suffix = suffix , permissions = permissions ) as fd : fd . close ( ) ( yield fd . name )
a with-context that creates a temporary file and returns its path .