Skip to content

Instantly share code, notes, and snippets.

@keitheis
Created October 17, 2012 07:57
Show Gist options
  • Save keitheis/3904292 to your computer and use it in GitHub Desktop.
Save keitheis/3904292 to your computer and use it in GitHub Desktop.
Make temporary file path
from tempfile import NamedTemporaryFile
def tempfile_path():
with NamedTemporaryFile(delete=False) as f:
return f.name
def main():
print tempfile_path()
if __name__ == '__main__':
main()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment