This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author serhiy.storchaka
Recipients Adam Dangoor, serhiy.storchaka
Date 2017-11-06.12:38:04
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1509971884.5.0.213398074469.issue31959@psf.upfronthosting.co.za>
In-reply-to
Content
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
History
Date User Action Args
2017-11-06 12:38:04serhiy.storchakasetrecipients: + serhiy.storchaka, Adam Dangoor
2017-11-06 12:38:04serhiy.storchakasetmessageid: <1509971884.5.0.213398074469.issue31959@psf.upfronthosting.co.za>
2017-11-06 12:38:04serhiy.storchakalinkissue31959 messages
2017-11-06 12:38:04serhiy.storchakacreate