> You see the GUI module is standalone. It provides > the user with menu's and a text dialog to create a script file. The first > line in the script file imports program.py and when the user has finished > creating the script file clicks a button and the GUI system basically calls > python to process the file. So there is no connection between the > program-GUI.py and program.py via an import.
So program_GUI is a kind of IDE, that lets users write python code for a special domain of interest and run it. Remember the purpose of PyInstaller is to make a self-contained package, so the user does not have to install Python or any modules. Everything the user needs is supposed to be in the bundle. I think the program you need to bundle is program_GUI, with program.py as a hidden import. Because in effect, program_GUI is doing a dynamic import of program.py at run-time. This kind of import, where the name of an imported file is not visible in the source code, is just what the hidden import arguments are for. Bundle program_GUI and specify with --hidden-import every module that you permit a user's script to call. This assumes that you limit the user to a known list of modules. If the user script can call any arbitrary module, I don't know what to say. -- You received this message because you are subscribed to the Google Groups "PyInstaller" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/pyinstaller. For more options, visit https://groups.google.com/d/optout.
