Message305639
This is by design. The first TemporaryDirectory object is destroyed before the first print statement. For not be surprised use TemporaryDirectory with the "with" statement.
with TemporaryDirectory() as td:
name = td.name
print(os.path.exists(name)) # prints True
print(os.path.exists(name)) # prints False |
|
Date |
User |
Action |
Args |
2017-11-06 12:38:04 | serhiy.storchaka | set | recipients:
+ serhiy.storchaka, Adam Dangoor |
2017-11-06 12:38:04 | serhiy.storchaka | set | messageid: <1509971884.5.0.213398074469.issue31959@psf.upfronthosting.co.za> |
2017-11-06 12:38:04 | serhiy.storchaka | link | issue31959 messages |
2017-11-06 12:38:04 | serhiy.storchaka | create | |
|