importing win32com.client.Dispatch with embedded interpreter

Gordon McMillan gmcm at hypernet.com
Tue Jul 31 18:51:21 EDT 2001


[posted and mailed]

Mike Haspert wrote:

> The minimal function f1(), below in usecom.py, runs fine from the
> command line, but when I use the C API for the interpreter, it runs
> the first time and fails thereafter. Can anyone see what I'm doing
> wrong? The error message "TypeError: this constructor takes no
> arguments" has me stumped.

[snip]

> int minimal(char* modname)
> {
>     bool success = false;
>     PyObject *mod,*func,*args,*rvals;
>     Py_Initialize();

[snip]

It's got nothing to do with f1.

You can't Py_Initialize() twice.

- Gordon



More information about the Python-list mailing list