Relative Content

Tag Archive for python-3.xpyinstallermkdir

os.mkdir on Mac OS with PyInstaller built apps

I have the following code (I removed the watermark_text function because I know it does its job). The code works fine when running on Terminal as a .py script but if I build an executable with pyinstaller (on Mac OS) it keeps working if I run it from terminal but when I double-click it from finder something goes wrong and no exception is shown. If the folders DIR and OUD_DIR don’t exist the os.mkdir function won’t create them and if the folders exist os.listdir won’t find any file. What’s the issue here? I tried pyinstaller on Windows on the same code and it works perfectly. What am I missing?