Advertisement
rfmonk

tempfile_mkdtemp.py

Jan 28th, 2014
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.24 KB | None | 0 0
  1. #1/usr/bin/env python
  2.  
  3. # this is from The Python
  4. # Standard Library by example
  5. # ISBN13: 9780321767349
  6.  
  7. import os
  8. import tempfile
  9.  
  10. directory_name = tempfile.mkdtemp()
  11. print directory_name
  12. # Clean up the directory
  13. os.removedirs(directory_name)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement