View Single Post
  #1  
Old 11-24-2014, 06:39 PM
chris2307 chris2307 is offline
Member
 
Join Date: Nov 2013
Posts: 36
Suggestion to Building EXEs

I encountered this problem for the first time this evening. I published a script to an executable which made heavy use of the Python XML processing module which was contained within another class. I also do not create an instance of this class until a file is loaded in (via a load button in the file menu).

I published the script to an EXE and was a bit perplexed as to why I was getting a error when attempting to load in an XML file. My error handling reported a missing module. It didn't take me too long to figure out that during the publishing process, when running the script, I actually needed to click on the Open dialogue in my application to load in an XML file for the process to automatically pick up the python module.

This is where my suggestion comes in. I understand that the publish function works so that it lists the dependencies when the script is run but is there no method of doing this without needing to run the script? Could a more elegant solution be found which automatically links the dependencies without needing to run the script before building it?

I am no expert on code deployment by any means so forgive me if there is a reason this cannot be accomplished but I fear it may trip others up. Especially if they're in the same boat as me and have only previously published simple scripts which load all dependencies in right at the beginning of the script and so have had no previous issues (and reason to suspect that this might happen).
Reply With Quote