parameters: ()
docstring: Return a path to save a temporary file to and delete afterwards
docstring_summary: Return a path to save a temporary file to and delete afterwards
docstring_tokens: Return a path to save a temporary file to and delete afterwards
function: def temp_file():
  	'Return a path to save a temporary file to and delete afterwards'
  	file = tempfile.mkstemp()
  	try:
  		os.close(file[0])
  		os.remove(file[1])
  		yield file[1]
  	finally:
  		if os.path.isfile(file[1]):
  			os.remove(file[1])
function_tokens: def temp_file ( ) : file = tempfile . mkstemp ( ) try : os . close ( file [ 0 ] ) os . remove ( file [ 1 ] ) yield file [ 1 ] finally : if os . path . isfile ( file [ 1 ] ) : os . remove ( file [ 1 ] )