importing win32com.client.Dispatch with embedded interpreter

Gordon McMillan gmcm at
Wed Aug 1 00:51:21 CEST 2001

[posted and mailed]

Mike Haspert wrote:

> The minimal function f1(), below in, 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.


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


It's got nothing to do with f1.

You can't Py_Initialize() twice.

- Gordon

More information about the Python-list mailing list