[Python-Dev] Embedded python on Win2K, import failures

Harri Pasanen harri@labs.trema.com
Fri, 11 Apr 2003 14:16:47 +0200


In a few hours old CVS checkout, I'm having problems getting the 
embedded python to work.

#include <Python.h>

char* cmd = "import sys; print sys.path\n"
"import re; print dir(re)\n";

int main()
	printf("Initialize done\n");

	return 0;

import re seems to be succeeded only half way, the output is:

Initialize done
['__builtins__', '__doc__', '__file__', '__name__', 'engine']

So the re namespace is lacking everything from sre.

On linux it works both embedded, and from the interactive interpreter.  
On Win2K the interactive interpreter seems to work fine.

On Win2K, I have this working ok using Python 2.2.2.

What gives?