Is there a way to import the name (or the path) of the random-generated temp folder?
I know about --runtime-tmpdir
which only defines the base path, but a random-named folder will still be created in that temp dir.
I see two (hacky) workarounds:
But, whats the proper way of doing this? Thanks
Update:
Found a better way: getattr(sys, '_MEIPASS', 'NotRunningInPyInstaller')
Old:
Found a way !
The temporary path is added automatically to sys.path
by pyinstaller. So it can easily be extracted from there.