is it possible to integrate Python into VBS ?

alex23 wuwei23 at gmail.com
Wed Nov 26 20:00:33 EST 2008


On Nov 27, 10:15 am, Stef Mientki <stef.mien... at gmail.com> wrote:
> How can I call Python from within VBS ?

Hey Stef,

The Windows Scripting Host (WSH) allows you to add other scripting
languages, such as Python (I _think_ this might even happen
automatically with ActivePython.) Script Components are a way of
creating COM objects in languages that supported by your WSH
installation. It uses an XML-based language to define the interface
for the COM object and how it interacts with the original script.
There's even a wizard for helping with this process.

It's been over 4+ years, but I did manage to successfully expose a
Python class using it, which could then be instantiated within VBS
using the standard CreateObject() call.

This might help you out:
http://msdn.microsoft.com/en-au/library/asxw6z3c(VS.85).aspx



More information about the Python-list mailing list