Am 04.04.2012 14:01, schrieb Miguel Angel: > i have been using Pyinstaller to freeze a program in Windows for some time > now, i have just upgraded xlrd module (http://pypi.python.org/pypi/xlrd) and > the > last version (0.7.6) have this line in __init__.py: > > __VERSION__ = open(path.join(path.dirname(__file__), > 'version.txt')).read().strip()
This will simply not work with a frozen app. Please see the manual for hot to adopt for being frozen. > I have collected datafiles before but i don't know how to collect a file and > put > it inside the outPYZ1.pyz archive, and i am not sure that putting directly > there > a file with a common name like "version.txt" would be a good idea anyway, i > suppose i should be doing anything else. Even if you'd add the file to the PYZ, the line above will not work: open() can not open content within an archive (no matter if PYZ or zip or something else). > What should i do? Thanks. Best solution is to contact the author so he will change his code. (IMHO Reading the version number from an external file is no good idea anyway.) -- Schönen Gruß - Regards Hartmut Goebel Dipl.-Informatiker (univ.), CISSP, CSSLP Goebel Consult Spezialist für IT-Sicherheit in komplexen Umgebungen http://www.goebel-consult.de Monatliche Kolumne: http://www.cissp-gefluester.de/ Goebel Consult ist Mitglied bei http://www.7-it.de
smime.p7s
Description: S/MIME Kryptografische Unterschrift
