Re: Py2Exe and Outlook (array bounds change!?)

From: Mark Hammond (mhammond_at_skippinet.com.au)
Date: 01/16/04


Date: Fri, 16 Jan 2004 13:11:14 +1100

Thomas Heller wrote:

> hlubocky@uiuc.edu (Brian Hlubocky) writes:
>
>
>>This one is really puzzling me. I am not that familiar with COM or
>>py2exe, but I have tested this a fair amount and am pretty sure of
>>what I am about to explain. The MSDN website says that the item list
>>in Outlook has array bounds from 1 to length. Using this information,
>>I wrote a program that adds contacts to outlook using an external
>>database. When I went to try this out with py2exe however, I got an
>>exception.
>>
>>What I found out is that when using py2exe, the bounds on the items
>>list changes from 1 to len, to 0 to len-1. Does anyone have any idea
>>why this might be? It seems goofy that this would happen. Testing is
>>on the developer machine, so I don't think different dlls could be the
>>problem. Thanks!
>
>
> Just a wild idea: can it be that you're using makepy generated modules
> in the script, and late bould com in the py2exe'd file?

That will almost certainly be the issue. The (next/latest/??) version
of py2exe has full support for including typelib info in your script.

Mark.



Relevant Pages

  • Re: Tinkering with py2exe
    ... Perhaps you should have read all the way through the py2exe home ... py2exe uses python's modulefinder to examine your script and find all ... python and extension modules needed to run it. ...
    (comp.lang.python)
  • Faking out __name__ == __main__
    ... I've got py2exe and Inno ... Setup running, so all that is well and good. ... When such a script is run with the command 'python myscript.py', ... However, when run with 'daborun ...
    (comp.lang.python)
  • python script to windows exe
    ... development.i am trying to write a script which will loop through the ... outlook 2003 inbox and save the email data in an simple data.html page ... created the exe. ... py2exe-0.6.6.win32-py2.5.exe of py2exe. ...
    (comp.lang.python)
  • Re: Hiding console window
    ... You can tell py2exe to make a windows exe by putting the line windows = ... python script (instead of the .exe version of that script). ... >> Use py2exe to compile Python programs to EXEs. ...
    (comp.lang.python)
  • Re: python script to windows exe
    ... development.i am trying to write a script which will loop through the ... outlook 2003 inbox and save the email data in an simple data.html page ... created the exe. ... py2exe-0.6.6.win32-py2.5.exe of py2exe. ...
    (comp.lang.python)