Last active
March 19, 2018 22:12
-
-
Save basuke/a7f11f349a69f01f71de05b3efeb9b6c to your computer and use it in GitHub Desktop.
Windows tempfile.NamedTemporaryFile : research
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
a = tempfile.NamedTemporaryFile(delete=False) | |
file(a.name, 'r') | |
#>>> <open file 'c:\\users\\basuke\\appdata\\local\\temp\\tmpdclqbx', mode 'r' at 0x0000000009290DB0> | |
a = tempfile.NamedTemporaryFile(delete=True) # default | |
file(a.name, 'r') | |
#--------------------------------------------------------------------------- | |
#IOError Traceback (most recent call last) | |
#<ipython-input-35-1cb82d16d8f2> in <module>() | |
#----> 1 file(a.name, 'r') | |
#IOError: [Errno 13] Permission denied: 'c:\\users\\basuke\\appdata\\local\\temp\\tmpssixrx' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment