Created
January 5, 2015 16:12
-
-
Save natefoo/cb7d35e9d2805a86b9ad to your computer and use it in GitHub Desktop.
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
nate@weyerbacher% python | |
Python 2.7.6 (default, Mar 22 2014, 22:59:56) | |
[GCC 4.8.2] on linux2 | |
Type "help", "copyright", "credits" or "license" for more information. | |
>>> import os, tempfile | |
>>> f = tempfile.NamedTemporaryFile() | |
>>> f.name | |
'/tmp/tmptZ3yCX' | |
>>> os.rename(f.name, '/tmp/foo') | |
>>> f.write('foo\n') | |
>>> f.close() | |
Traceback (most recent call last): | |
File "<stdin>", line 1, in <module> | |
File "/usr/lib/python2.7/tempfile.py", line 418, in close | |
self.unlink(self.name) | |
OSError: [Errno 2] No such file or directory: '/tmp/tmptZ3yCX' | |
>>> open('/tmp/foo').read() | |
'foo\n' | |
>>> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
FYI, the specific error on hardlinking in a vboxvfs: