embedding in COM object confusion

Mark Hammond mhammond at skippinet.com.au
Mon May 26 19:51:42 EDT 2003


Achim Domma wrote:
> "Mark Hammond" <mhammond at skippinet.com.au> wrote in message
> news:aEcAa.2034$ES.21779 at news-server.bigpond.net.au...
> 
>>I am surprised that fails.  However, calling Py_Init/Fini like this is
>>asking for some trouble.  I suggest you simply init once, and finalize
>>once (if at all).  Yes, it *should* work, but...
> 
> 
> I also tried checking Py_IsInitialized first, but it does not make a
> difference.
> 
> 
>>If you really care, you could re-write this in C and turn it into a
>>standalone test that fails, then upload it to a new bug on sourceforge.
> 
> 
> I really care, but I don't think that I'm able to write a COM objekt in pure
> C.

Actually, I meant to reproduce in a standard C program rather than a COM 
object.  I would be surprised if COM is the issue, but more the way the 
Python API is being used (either in error, or in such a way as to expose 
a bug)


> I would like to try that, but I have some problems: I only have VC7 so it
> seems that I have to use Python 2.3, but this is no problem.

 > I got the
> current version from CVS an compiled it. But I think I will also have to
> compile your win32 tools from scratch. And how do I set up a valid
> installation from the stuff I compiled from CVS?

Basically just get your PYTHONPATH pointing at the directories.  I use 
the registry.  Eg, I have the following keys:

HKEY_LOCAL_MACHINE\SOFTWARE\Python\PythonCore\2.3\PythonPath\win32:
E:\src\pythonex\win32\Build;E:\src\pythonex\win32\Lib

(ie, pointing at the directory where the .pyds are built, and the .py 
files).  Similarly for COM and Pythonwin.

Mark.
> 
> Achim
> 
> 





More information about the Python-list mailing list