temporary-directory

Right way to clean up a temporary folder in Python class

Right way to clean up a temporary folder in Python class Question: I am creating a class in which I want to generate a temporary workspace of folders that will persist for the life of the object and then be removed. I am using tempfile.mkdtemp() in the def __init__ to create the space, but I …

Total answers: 6

Cross-platform way of getting temp directory in Python

Cross-platform way of getting temp directory in Python Question: Is there a cross-platform way of getting the path to the temp directory in Python 2.6? For example, under Linux that would be /tmp, while under XP C:Documents and settings[user]Application settingsTemp. Asked By: Joril || Source Answers: That would be the tempfile module. It has functions …

Total answers: 5