473,378 Members | 1,605 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

Are makepy-generated COM wrapper classes distributable?

Hi!

I've just written a Python speech-recognition module (http://
pyspeech.googlecode.com). It provides a clean and simple interface to
the Microsoft Speech SDK using COM wrapper classes generated by
PythonWin's MakePY utility.

Once this is a mature module, I'd like to make it as useful as
possible to the community, so I'd like to make installation as simple
as possible. Currently, to get speech.py to work, you must first:

* install the Microsoft Speech SDK onto a Windows box, and
* possibly install PythonWin, and then
* run PythonWin's MakePY utility to generate modules into the gen_py
dir.

I'd like to remove the MakePY steps, so that as long as a user has run
the SDK installer, she can install the 'speech' package and be ready
to use it. Can I somehow bundle the generated modules into my
setuptools package so that the wrappers are installed at the same
time? (If so, how -- just copy them into the package directory?) Or
are the wrappers targeted to my machine or installation, so that
everyone is forced to go through this?

Thanks for any pointers,
Michael
Aug 4 '08 #1
1 1477
On Aug 4, 2:24*am, gundlach <gundl...@gmail.comwrote:
Can I somehow bundle the generated modules into my
setuptools package so that the wrappers are installed at the same
time? *(If so, how -- just copy them into the package directory?) *Or
are the wrappers targeted to my machine or installation, so that
everyone is forced to go through this?
I answered my own question, and it's even better than I had hoped
for. For posterity: running

python $PYTHONDIR/lib/site-packages/win32com/client/makepy.py -i

and selecting your COM class of choice will output the Python code to
stick into your module which guarantees that the necessary wrapper
classes exist in the cache. If they don't, they're created at
runtime. If they do, it's a no-op.

So there's no need for me to tell users to run MakePY, nor for me to
copy the generated classes into my project somehow. Great!

Michael
Aug 5 '08 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: bk | last post by:
hi, thank you for the hint, but i solved the problem myself. i didnt knew that that the following two lines in py-script must be added: from win32com.client import gencache...
1
by: Alv Mart | last post by:
Hi, I ran makepy for ADO. After I installed a new version of python I have this error: Do you know why could I have this error? >>> from ADODB import Connection,Recordset >>> conn =...
3
by: Gerson Kurz | last post by:
I have problems getting "COM makepy" working in ActivePython 2.3.2. This is what happens when I start "COM makepy" from the Pythonwin Menu: PythonWin 2.3.2 (#49, Nov 6 2003, 10:18:20) on...
2
by: Svenn-Ivar Svendsen | last post by:
Hi, I use the makepy tool in pythonwin to generate wrappers for my connection point (event) interfaces in a project. It works fine. The question is; Is it possible, in a python script, to detect...
2
by: nvhengr | last post by:
Has anyone seen this? When I run the COM Makepy utility and choose Microsoft Excel 9.0 Object Library (1.3), I get an application error message: PythonWin: Pythonwin.exe - Application Error...
0
by: Paul Keating | last post by:
I used MakePy to generate .py support for a COM dll. That created the file 30D58DAF-B538-45F1-8EFF-F69ABA2BA798x0x1x13.py I want to be sure that this file is present and so I used MakePy -i to...
2
by: Jim | last post by:
I was trying to use Makepy to wrap a typelib, but couldn't find the one I wanted in the list of libs offered, and couldn't find a way to browse to a specific one. Turns out the reason was that...
1
by: Chris Curvey | last post by:
I'm trying to track down a performance issue in my Windows code, and hotshot is telling me that the most time and calls are spent in these methods ncalls tottime percall cumtime percall...
1
by: bg_ie | last post by:
Hi, I have a problem where an earlier version of my Com object is being used by makepy for early binding. In makepy I see - MyCom (1.0) MyCom (1.0) MyCom (2.0) I created version 2 of my...
4
by: suzhi18 | last post by:
Hallo, I've a problem getting makepy running. When I start the tool on my machine with doubleclick everything is fine. But when I try this in my Code: makepy.py -i "Microsoft Excel 11.0...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.