Hi Thomas,

I did some tests with this program :
        self.ltDocActifs.clear()
        self.ltDocActifs.addItem(" coucou")
        self.ltDocActifs.addItem(" coucou2")

         word = win32.gencache.EnsureDispatch("Word.Application")
        self.ltDocActifs.addItem(" coucou3")

When my program is "cxfreezed" in fact it prints " coucou" and " coucou2". Never " coucou3" because is after "win32.gencache.EnsureDispatch("Word.Application")".
It is a problem with pywin32.
In my searchs on Internet, I have readen on Py2exe documentation somes informations about this problem
http://www.py2exe.org/index.cgi/IncludingTypelibs
At the end of this page , Thomas MacKay <http://www.py2exe.org/index.cgi/MacKay> makes a setting in py2exe like this :

setup(
   console=['HELLO_MAIN.py'],
   options={
       "py2exe":{
            "skip_archive": True

He does not create a Library zip file in the repertory. All the files are in the principal repertory. I do the same with cxFreeze and in the build\exe.win32-2.7\, I have dezipped the library's zip of my program (not in a \library\ but directly in the repertory of my program) and I have runned my program and all works fine !

It is all that I have found. It is a patch_up job and I am not a very good informatician and I am not able to do more.

Cheers,
Bruno

Le 06/02/2013 16:12, Thomas Kluyver a écrit :

Hi Bruno,

The sort of thing I mean about a minimal example is, if you make a script something like this:


/word = win32.gencache.EnsureDispatch("Word.Application")//
/
/print word
/
/print word.Documents
/
/print len(word.Documents)
/
/for d in word.Documents:
/
/  print d.Name

/
Run it directly, and you should see information about your open documents. Then freeze it (with the Console base) and run the frozen version. If it fails, you should see some idea of what the problem is. If it works, how much more of your program do you need to add in to make it fail?/
/
Best wishes,
Thomas/
/

------------------------------------------------------------------------------
Free Next-Gen Firewall Hardware Offer
Buy your Sophos next-gen firewall before the end March 2013 
and get the hardware for free! Learn more.
http://p.sf.net/sfu/sophos-d2d-feb
_______________________________________________
cx-freeze-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/cx-freeze-users

Reply via email to