is it possible to integrate Python into VBS ?

S

Stef Mientki

hello,

We use a commercial database application (Ultimo),
that has embedded VBS (Visual Basic Script) editor / execution.
Knowing Python now, VBS seems quit clumsy.

We can't replace the build-in scripting completely,
because the VBS (which has to have some predefined strctures) is
interpreted by the database program, before it's executed.
But as far as we know there are no restrictions on the VBS.
So it should be possible to do the real work in Python.

How can I call Python from within VBS ?
I googled, but didn't find any relevant pages (probably used the wrong
words).

thanks,
Stef Mientki
 
A

alex23

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,011
Latest member
AjaUqq1950

Latest Threads

Top