Created
October 17, 2012 07:57
-
-
Save keitheis/3904292 to your computer and use it in GitHub Desktop.
Make temporary file path
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
See also: http://stackoverflow.com/questions/7877282/how-to-send-image-generated-by-pil-to-browser