[python-win32] Running the COM MakePy Utility from python
Massa, Harald Armin
chef at ghum.de
Thu Aug 27 10:29:45 CEST 2009
Grant,
that is possible. Just read the makepy.py script within win32com.client, and
you will find that someway down main() there is
---------
GenerateFromTypeLibSpec(arg, f, verboseLevel = verboseLevel, bForDemand =
bForDemand, bBuildHidden = hiddenSpec)
---------
which does this.
BUT, for "static" usage of makepy-COM-Mappings I suggest to make makepy
output it's results in a named file
makepy -o ADO28.py
and furtheron import that ADO28 file to access the variables. That does also
work with Excel and Word, and I am used to
import ExcelXX as Excel
ec=Excel.constants
and further on us ec.* for excel constants.
Best wishes,
HArald
On Thu, Aug 27, 2009 at 2:51 AM, Grant Paton-Simpson <grant at p-s.co.nz>wrote:
> Hi,
>
> Basically I want to have an installation package automatically run the
> COM MakePy utility for the ADO 2.8 library. I believe I need to do this
> so that constants like win32com.client.constants.adTinyInt will be
> available when my application (http://www.sofastatistics.com) connects to
> MS Access and MS SQL Server databases.
>
> Ideally I would have a line doing something like this:
>
> win32com.runmakepy("Microsoft ActiveX Data Objects 2.8 Library (2.8)")
>
> Is it possible to do this programmatically?
>
>
> All the best, Grant
> _______________________________________________
> python-win32 mailing list
> python-win32 at python.org
> http://mail.python.org/mailman/listinfo/python-win32
>
--
GHUM Harald Massa
persuadere et programmare
Harald Armin Massa
Spielberger Straße 49
70435 Stuttgart
0173/9409607
no fx, no carrier pigeon
-
LASIK good, steroids bad?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-win32/attachments/20090827/c8386230/attachment-0001.htm>
More information about the python-win32
mailing list