Hello!
 
A python script that uses the EXE COM object has been converted to exe
with pyinstaller.
Now a constant is missing -- I was told on the pywin32 mailing list
that pyinstaller needs to be instructed to use makepy support (see
below).
How can I persuade pyinstaller to include excel com support into the
executable?
 
Mit freundlichen Grüßen
Dr.Hartmut Niemann
> 
> 
> > -----Ursprüngliche Nachricht-----
> > Von: Mark Hammond [mailto:[email protected]]
> > Gesendet: Dienstag, 30. April 2013 06:09
> > An: Niemann, Hartmut; [email protected]
> > Betreff: Re: [python-win32] Excel + pyinstaller: missing a constant:
> > xlTopToBottom
> >
> > On 30/04/2013 2:21 AM, Niemann, Hartmut wrote:
> > > Hello!
> > > The following snippet
> > > from win32com.client import constants as xl_constants
> > > wbook.ActiveSheet.Range('A3:N' + str(row + 1)).Sort(
> > >          Key1 = wbook.ActiveSheet.Range('B3'), Orientation =
> > > xl_constants.xlTopToBottom,
> > > DataOption1 = xl_constants.xlSortTextAsNumbers
> > > )
> >
> > The above works be leveraging "makepy" support - so something (either
> > code not shown above, or by manually running makepy.py) has generated
> > a file with the Excel object model, including the constants.
> >
> > > from a script that is exe-fied with pyinstaller fails with
> Traceback
> > > (most recent call last):
> > >    File "<string>", line 502, in process_chain
> > >    File "<string>", line 451, in process_project
> > >    File "<string>", line 330, in create_fg
> > >    File "D:\temp\lib_chain\out00-PYZ.pyz\win32com.client", line
> 170,
> > > in __getattr__
> > > AttributeError: xlTopToBottom
> > > Is this a pywin problem? Do we need to instruct pyinstaller to work
> > > differently to cooperate with Excel?
> > > Any ideas?
> > > (This is python 2.7.3 on Windows XP)
> >
> > You need to tell pyinstaller to use makepy support for certain
> objects.
> >   py2exe has basic support for that, but I'm not familiar with
> > pyinstaller to tell you how it might be done there - you probably
> need
> > to find a pyinstaller mailing list and ask there.
> >
> > HTH,
> >
> > Mark
> >
> > >
> > > Mit freundlichen Grüßen
> > > Dr. Hartmut Niemann
> > >

-- 
You received this message because you are subscribed to the Google Groups 
"PyInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/pyinstaller?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to