On 18/11/2009 1:05 PM, Hung Nguyen wrote:
Hi Mark,
To clarify the requirement:
1) The application is a C++, COM application that has CPython embeded in it.
2) There are some data elements, let say COM objects, in the application's
process space
3) The application invoke a Python script that runs on the Python engine
4) The script needs to be able to operate upon the above COM objects, e.g.
calling methods in the interfaces exposed by the COM objects.
5) The script needs to be able to instantiate COM objects and somehow pass them
back to the application.
You are likely to need to link to (or load dynamically) some of the
entry-points in pythoncomxx.dll - you will find functions for converting
to and from COM objects via IDispatch etc pointers. For non COM objects
you just use the CPython API. See pythoncom.h for more details...
HTH,
Mark
Please let me know if you need further information.
Thanks,
Hung.
----- Original Message ----
From: Mark Hammond<[email protected]>
To: Hung Nguyen<[email protected]>
Cc: Python-Win32 List<[email protected]>
Sent: Tue, November 17, 2009 5:50:21 PM
Subject: Re: [python-win32] Passing data to/from Python script
On 18/11/2009 8:48 AM, Hung Nguyen wrote:
I am working on an application that has Python embeded into it to run
Python scripts. Using the Python for Windows extension, what is the best
way to pass data, potentially COM objects, back and forth between the
host application and the scripts.
"Pass them as parameters?" Otherwise, you need to give more detail about the
environment before I can answer more meaningfully.
Cheers,
Mark.
_______________________________________________
python-win32 mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-win32