hi,guys,
           I am a beginner of python, recently I wrote a GUI software using 
wxpython and in this software, I import a package named topia.termextractor 
which includes a txt file whose absolute path is 
C:\Python27\Lib\site-packages\topia.termextract-1.1.0-py2.7.zip\topia\data\english-lexicon.txt.
 
Then I use cx_freeze to turn my software to an exe with this command: python 
setup.py build.
setup.py script as below:

import sys
from cx_Freeze import setup, Executable
buildOptions = dict(include_files = ["config.txt"],zip_includes 
=[("C:\Python27\Lib\site-packages\\topia.termextract-1.1.0-py2.7.egg\\topia\\termextract\data\english-lexicon.txt","topia\\termextract\data\\english-lexicon.txt")])
 
setup(
         name = "mysoftware",
         version = "1.0",
         description = "description",
         author = "your name",
         options = dict(build_exe = buildOptions),
         executables = [Executable("mysoftware.py")])

After setup.py ran over, I found english-lexicon.txt is included in 
library.zip, and in this zip file, its relative path is 
topia\termextract\data\english-lexicon.txt. But when I run mysoftware.exe, an 
error occured:
    cant open file 
“e:\mysoftware\build\library.zip\topia\termextract\data\english-lexicon.txt”
    I think the cause of this error is that some function need read 
english-lexicon.txt,but now english-lexicon.txt is included in a zip file,so it 
cant be opened.
       SO HOW CAN I fix this error?



squirre...@126.com
------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk
_______________________________________________
cx-freeze-users mailing list
cx-freeze-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cx-freeze-users

Reply via email to