lib.iewin hangs py2exe build

I did switch the application from wx.lib.iewin to wx.lib.iewin_old and the problem disappeared. I am going to do a little more research, but maybe someone who understands the differences between old and new iewin module could shed some light on this. I am not a Windows programming expert, but think I understand a little about the change when I read the code.

For us, the old iewin code is giving us the functionality we need (at least in testing), so that will be the solution for now unless someone can tell me why the old version might not be appropriate.

I will definitely be getting back to this because we intend to use the .pdf module also in a later version and looking at the code, I think we have the same problem. I suspect it has something to do with the way the comtypes module behaves.

···


Mike Conley

On Thu, Apr 9, 2009 at 3:20 PM, Christopher Barker Chris.Barker@noaa.gov wrote:

Mike Conley wrote:

I am having a problem building an executable with py2exe that imports wx.lib.iewin.

I’ve been doing exactly that with a large app, with no problems. However, when I try your little test script, I find that py2exe uses about 50% CPU (maybe because I have dual cores), and runs a long, long time…but it eventually terminates and appears to work.

It may well get caught in a loop, but terminate eventually.

Indeed, that’s what I found with my larger app – it took very long for py2exe to run – I thought it was 'cause the app is big and complex, with lots of modules, and my laptop is painfully slow, but it looks like it may be an issue with that module.

I’d love it if you debugged this :wink:

-Chris

Christopher Barker, Ph.D.

Oceanographer

Emergency Response Division

NOAA/NOS/OR&R (206) 526-6959 voice

7600 Sand Point Way NE (206) 526-6329 fax

Seattle, WA 98115 (206) 526-6317 main reception

Chris.Barker@noaa.gov


wxpython-users mailing list

wxpython-users@lists.wxwidgets.org

http://lists.wxwidgets.org/mailman/listinfo/wxpython-users

Mike Conley wrote:

I did switch the application from wx.lib.iewin to wx.lib.iewin_old and the problem disappeared. I am going to do a little more research, but maybe someone who understands the differences between old and new iewin module could shed some light on this. I am not a Windows programming expert, but think I understand a little about the change when I read the code.

For us, the old iewin code is giving us the functionality we need (at least in testing), so that will be the solution for now unless someone can tell me why the old version might not be appropriate.

I will definitely be getting back to this because we intend to use the .pdf module also in a later version and looking at the code, I think we have the same problem. I suspect it has something to do with the way the comtypes module behaves.

One of the modules generated by comtypes is very huge. Py2exe may be choking on that.

···

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!

Robin Dunn wrote:

One of the modules generated by comtypes is very huge. Py2exe may be choking on that.

could be. Does anyone know if py2exe has anything similar for py2app's "recipes"? It may be possible to have it not try to parse out comtypes stuff, but rather just be told what it include if comtypes is there.

Just a thought,

-Chris

···

--
Christopher Barker, Ph.D.
Oceanographer

NOAA/OR&R/HAZMAT (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception

Christopher Barker wrote:

Robin Dunn wrote:

One of the modules generated by comtypes is very huge. Py2exe may be choking on that.

could be. Does anyone know if py2exe has anything similar for py2app's "recipes"? It may be possible to have it not try to parse out comtypes stuff, but rather just be told what it include if comtypes is there.

There was talk about having 'recipes' but I don't think they made it yet.

I just did a little test script which does:
import wx
import wx.lib.iewin

print 'we did the import'

and then created a setup.py using Gui2Exe. The first compile took 19 sec on a Windows Vista machine (dual core 1.86Ghz and 4GB memory), the second compile took 10 seconds (regards if I selected clean dist/build folder or not under options).

I use wx.lib.iewin in my shareware and I do not see any long delay there either - at least nothing which I noticed when I recently added this to my shareware).

So, maybe there is some other stuff which causes a long delay - maybe a py2exe version issue (see below I use a relatively old one as I have had no time/need to upgrade).

Attached is the setup.py generated by Gui2Exe.

Werner

P.S. some version info:
# Python 2.5.4 (r254:67916, Dec 23 2008, 15:10:54) [MSC v.1310 32 bit (Intel)]
# wxPython 2.8.9.1, Boa Constructor 0.6.1

py2exe.__version__
'0.6.6'

setup.py (3.95 KB)

Robin got me on the right track here.

comtypes\gen_3050F1C5_98B5_11CF_BB82_00AA00BDCE0B_0_4_0.py

is a 60,000+ file. the .pyc is over 1.4Mb

trying to run a one liner that just imports that file through py2exe creates the problem. I suspect that letting it run long enough would eventually go to conclusion. Unfortunately we do our build on a relatively low power machine and probably can’t change that any time soon (startups don’t have much money).

Does anyone know if there is a technique to tell py2exe to “put this in your output, but don’t bother to analyze it”? If so, I can manually include this file and any relevant dependencies.

···


Mike Conley

On Sat, Apr 11, 2009 at 6:04 AM, Werner F. Bruhin werner.bruhin@free.fr wrote:

Christopher Barker wrote:

Robin Dunn wrote:

One of the modules generated by comtypes is very huge. Py2exe may be choking on that.

could be. Does anyone know if py2exe has anything similar for py2app’s “recipes”? It may be possible to have it not try to parse out comtypes stuff, but rather just be told what it include if comtypes is there.

There was talk about having ‘recipes’ but I don’t think they made it yet.

I just did a little test script which does:

import wx

import wx.lib.iewin

print ‘we did the import’

and then created a setup.py using Gui2Exe. The first compile took 19 sec on a Windows Vista machine (dual core 1.86Ghz and 4GB memory), the second compile took 10 seconds (regards if I selected clean dist/build folder or not under options).

I use wx.lib.iewin in my shareware and I do not see any long delay there either - at least nothing which I noticed when I recently added this to my shareware).

So, maybe there is some other stuff which causes a long delay - maybe a py2exe version issue (see below I use a relatively old one as I have had no time/need to upgrade).

Attached is the setup.py generated by Gui2Exe.

Werner

P.S. some version info:

Python 2.5.4 (r254:67916, Dec 23 2008, 15:10:54) [MSC v.1310 32 bit (Intel)]

wxPython 2.8.9.1, Boa Constructor 0.6.1

py2exe.version

‘0.6.6’


wxpython-users mailing list

wxpython-users@lists.wxwidgets.org

http://lists.wxwidgets.org/mailman/listinfo/wxpython-users

Mike Conley wrote:

Robin got me on the right track here.
  comtypes\gen\_3050F1C5_98B5_11CF_BB82_00AA00BDCE0B_0_4_0.py
is a 60,000+ file. the .pyc is over 1.4Mb

trying to run a one liner that just imports that file through py2exe creates the problem. I suspect that letting it run long enough would eventually go to conclusion. Unfortunately we do our build on a relatively low power machine and probably can't change that any time soon (startups don't have much money).

Does anyone know if there is a technique to tell py2exe to "put this in your output, but don't bother to analyze it"? If so, I can manually include this file and any relevant dependencies.

--
Mike Conley

You probably need to run this problem by the guys on the py2exe list. They can tell you if there's a switch to do something like that.

- Mike

···

On Sat, Apr 11, 2009 at 6:04 AM, Werner F. Bruhin > <werner.bruhin@free.fr <mailto:werner.bruhin@free.fr>> wrote:

    Christopher Barker wrote:

        Robin Dunn wrote:

            One of the modules generated by comtypes is very huge.
             Py2exe may be choking on that.

        could be. Does anyone know if py2exe has anything similar for
        py2app's "recipes"? It may be possible to have it not try to
        parse out comtypes stuff, but rather just be told what it
        include if comtypes is there.

    There was talk about having 'recipes' but I don't think they made
    it yet.

    I just did a little test script which does:
    import wx
    import wx.lib.iewin

    print 'we did the import'

    and then created a setup.py using Gui2Exe. The first compile took
    19 sec on a Windows Vista machine (dual core 1.86Ghz and 4GB
    memory), the second compile took 10 seconds (regards if I selected
    clean dist/build folder or not under options).

    I use wx.lib.iewin in my shareware and I do not see any long delay
    there either - at least nothing which I noticed when I recently
    added this to my shareware).

    So, maybe there is some other stuff which causes a long delay -
    maybe a py2exe version issue (see below I use a relatively old one
    as I have had no time/need to upgrade).

    Attached is the setup.py generated by Gui2Exe.

    Werner

    P.S. some version info:
    # Python 2.5.4 (r254:67916, Dec 23 2008, 15:10:54) [MSC v.1310 32
    bit (Intel)]
    # wxPython 2.8.9.1, Boa Constructor 0.6.1

    py2exe.__version__
    '0.6.6'

    _______________________________________________
    wxpython-users mailing list
    wxpython-users@lists.wxwidgets.org
    <mailto:wxpython-users@lists.wxwidgets.org>
    http://lists.wxwidgets.org/mailman/listinfo/wxpython-users

------------------------------------------------------------------------

_______________________________________________
wxpython-users mailing list
wxpython-users@lists.wxwidgets.org
http://lists.wxwidgets.org/mailman/listinfo/wxpython-users