title: Adding a text file to an exe generated by PyInstaller
body: <p>I have a rather interesting problem I've been trying to find a way to solve, and as of the moment, I have not found a solution to. I currently have built a GUI program using Python, and more specifically using Tkinter, which will generate a file with a list of commands to be repeated by my program in the specified order while waiting however long is specified. It's basically used to create a macro, which is recorded in a file and can be ran later using another function in the program.</p>
  
  <p>What I would like to add to my program is a manner in which to create an .exe file, which is a standalone file, that can run a script from within it. The reason I can not find a good way to do this though is because I need for it to be created on the fly. What I was thinking I'd like to do is generate an .exe(Standalone macro exe) with PyInstaller ahead of time, and package this in to my main .exe also using PyInstaller. When you choose the option to create a standalone macro, it would proceed to get the .exe(Standalone macro exe) which I had packaged in to my main .exe from the directory in which it was unpacked in to when the program was run, copy it to the desired location for the standalone exe to be saved to, and then copy the script the user wished to be run as a standalone and package it in to the standalone exe.</p>
  
  <p>I have no idea how to go about this, because I'm not sure exactly how PyInstaller puts the files in to a .exe when it packages it. Because of that, I wouldn't know how to add a file to an existing .exe using python.</p>
  
  <p>Basically what I need help with is how I might go about adding a text file to an .exe generated by PyInstaller.</p>