
June 18th, 2004, 09:37 AM
|
|
Contributing User
|
|
Join Date: Feb 2004
Location: London, England
|
|
|
If you have the Win32All extensions installed then there should already be a COM object registered called "Python.Interpreter". This exposes the functions Eval and Exec, which do what you would expect. This will allow you to execute Python code, but you will not be able to pass Python or VB objects back and forth, just strings, numbers and other basic types.
The source is in Python\Lib\site-packages\win32com\servers\interp.py.
Extending it to handle objects is possible, but outside the scope of this post.
Dave - The Developers' Coach
|