This code should sense that there is no data sub-directory,
and create it, but it doesn't on windows 7, but I swear it worked in the past.
I guess i could use shutil
and create it, but it doesn't on windows 7, but I swear it worked in the past.
I guess i could use shutil
1 2 3 4 5 6 7 8 |
import os datapath = f '{os.path.abspath(os.getcwd())}\\data' if not os.path.exists(datapath): print ( 'creating path' ) os.makedirs(datapath) else : print ( 'path exists' ) |