How to recognize where my python code creates temp files?

580 Views Asked by At

In my python code i employed several libraries such as pathos, arcpy and numpy. However each time i run the code, about 0.5 GB of free space of my drive C, decreases, although the python file is on another drive. It looks like that the code generates temp files. Now my drive C has not any free space, consequently the code execution results in OSError: [Errno 28] No space left on device. I checked all temp folders on drive C but non of them has a large volume. My question is that is there any way to recognize the direction where files are being written during code execution to find the direction of unwanted temp files?

My OS is Windows 10 and i use python 2.7 .

1

There are 1 best solutions below

0
Ejaz Arain On

type echo %temp% on command prompt and it should provide the location of temp directory.

You can change the temp directory location by typing system in start menu and on system window click on advance system settings this should open system properties dialog, on this dialogue select environment variables and carefully change the temp environment variable to other drive location for a user.

hope this solves it for you appolgies if it dose not.