Using a package like PyInstaller

James Stroud jstroud at ucla.edu
Sun May 28 02:14:44 EDT 2006


LittlePython wrote:
> That is very close to what I have being doing, however I was unable to
> enclose a bmp or another file for that matter in the exe. I used both DATA
> and BINARY key words with no luck. I checked what was in the package and
> there were there. I guess for some reason it could not locate then when
> executed. I used snap 274 if I remember correctly.

You can include files with innosetup under the [FILES] section. The docs 
show how. You can then code absolute paths to these resources in your 
code according to the results of 'sys.platform'. If you use the 
"--onedir" option, then you may want to look here:

http://pyinstaller.hpcf.upr.edu/docs/Manual_v1.1.html#accessing-data-files


> I am worrying that
> when the py script is run I am leaving behind files. That the components of
> my stand-alone exe is somehow coming out of the exe (PyInstaller) and being
> installed.

Im 99.999% confident that this will not happen from the .exe file 
generated by pyinstaller (unless you specify--see link above).

However, innosetup will put files in the 'Program Files' directory or 
wherever you specify. This would be similar to just about every other 
application out there for windows.

James

-- 
James Stroud
UCLA-DOE Institute for Genomics and Proteomics
Box 951570
Los Angeles, CA 90095

http://www.jamesstroud.com/



More information about the Python-list mailing list