Adding to VB
Jeff Shannon
jeff at ccvcorp.com
Mon Jul 12 16:55:53 EDT 2004
F. GEIGER wrote:
> *** wrote:
>
>> I'm looking for a simple way to add python scripting support to a VB
>> project so that I can have a python script modify what the vb program
>> does. A
>
>
> Have a look into Mark Hammonds PPW32 book, Mark and Andy do this in
> one of their excellent real world examples.
A brief summary of the approach they use -- design your VB project as a
set of COM objects. Create a set of Python classes that understand how
to manipulate those COM objects. Embed a Python interpreter inside of
your VB project (as yet another COM object). You now can use Python
code to manipulate all (exposed) aspects of your VB app.
But seriously, go buy the PPW32 book. If you're doing anything
involving COM objects, it's well worth it -- and if you're scripting
other applications on Windows, you *should* be doing it through COM.
Jeff Shannon
Technician/Programmer
Credit International
More information about the Python-list
mailing list