I am using Vizard to create an .exe file off a python script. I need this script to create a folder which resides next to the .exe file
if getattr(sys, 'frozen', False):
logging.warning('Application is exe')
loggingPath = os.path.dirname(sys.executable)
logging.warning(os.getcwd())
elif __file__:
loggingPath = os.path.dirname(__file__)
logging.warning('Application is script')
logging.warning(os.getcwd())
if not os.path.exists(loggingFolder):
logging.warning('Directory not existing... creating..')
os.makedirs(loggingFolder)
works fine when I execute from the IDE, but in an exe file it throws data in the Appdata Folder in Windows/Users/Temp/randomfoldername.
Also, I always Application is script, even when its packed into exe.
Can someone point me in the right direction here? Thanks in advance