on-internet
← Community

Importing external module in single-file exe created with PyInstaller

Stack Overflow ·

I am using PyInstaller to create a single-file executable. Is it possible for my script to perform an import such that i) the imported module is imported from the same directory as the exe (i.e. it's not packaged into the exe) and ii) that imported module can import other modules that were packaged into the exe? The background here is that the imported module contains configuration that the user should be able to modify. This may include creation of custom derived classes and use of enums from the packaged modules. I haven't found any advice on this, though it's a difficult search because ther

Comments

Sign in or sign up to comment and upvote.

No comments yet.