Sorry for top posting but I'm using yahoo mail :(

I tried both your suggestions and neither solved the problem. I added 'import 
atexit' at the very top of my script and did
c:\Python27\Scripts\cxfreeze.bat --base-name Win32GUI --target-dir=002 
--include-modules=atexit gui.py
and got:

---------------------------
cx_Freeze: Python error in main script
---------------------------
Traceback (most recent call last):
  File "C:\Python27\lib\site-packages\cx_Freeze\initscripts\Console.py", line 
27, in <module>
    exec code in m.__dict__
  File "gui.py", line 8, in <module>
ImportError: No module named atexit

So it moved but still the same problem.

As you can see, I'm using python2.7 and cxfreeze 4.2.1. What  are the version 
you have it working with?

Thanks,





________________________________
From: Ryan Kelly <[email protected]>
To: [email protected]
Sent: Sat, December 18, 2010 12:36:00 AM
Subject: Re: [PySide] pyside cxfreeze problem

On Fri, 2010-12-17 at 21:10 -0200, Hugo Parente Lima wrote:
> On Friday 17 December 2010 13:01:09 Simon Leung wrote:
> > Hi all,
> > 
> > I'm just starting to use PySide. Unfortunately my application will
> > have to run on Windows, with a .exe file. So I tried to use cx_freeze
> > to package pyside examples -- the one I tried was classwizard.py.  So
> > I simply tried
> > cx_freeze classwizard.py --base-name Win32GUI
> > After it's done, I run the classwizard.exe and got the following
> > error:
> > 
> > 
> >  File "C:\Python27\lib\site-packages\cx_Freeze\initscripts
> > \Console.py", line 27
> > , in <module>
> >    exec code in m.__dict__
> >  File "classwizard.py", line 8, in <module>
> >  File "C:\Python27\lib\site-packages\PySide\__init__.py", line 2, in
> > <module>
> >    import private
> >  File "C:\Python27\lib\site-packages\PySide\private.py", line 1, in
> > <module>
> >    import atexit
> > ImportError: No module named atexit
> 
> atexit module exists in Python since Python 2.0, so my guess is that your 
> Python installation may be broken.

Or perhaps the "atexit" module is being excluded from the freeze for
some reason.  Try to explicitly include the "atexit" module in your
frozen app, either by

a) importing it yourself in one of your main modules, or
b) using "cxfreeze --include-modules=atexit" as your freeze command


  Cheers,

     Ryan

-- 
Ryan Kelly
http://www.rfk.id.au  |  This message is digitally signed. Please visit
[email protected]        |  http://www.rfk.id.au/ramblings/gpg/ for details


      
_______________________________________________
PySide mailing list
[email protected]
http://lists.openbossa.org/listinfo/pyside

Reply via email to