How to build extensions on Windows?

John Machin sjmachin at
Thu Sep 14 02:28:40 CEST 2006

Martin v. Löwis wrote:
> John Machin schrieb:
> > Any support for the radical notion of the error message giving the full
> > path of the file that it's complaining about? If so, I'll lob in an
> > enhancement request in the morning ...
> A patch would be appreciated much more so.

Hi Martin, I do hope you don't regret opening Pandora's box :-)

Does the following look about right?
I was somewhat bemused by the limit of 200 bytes on the module name in
the error message-- I woild have thought about 20 was more appropriate.
Sorry but I can't test this (Windows box, don't have whatever version
of C compiler is necessary to compile Python).

--- Python/importdl.c.orig      2006-09-14 09:53:59.984375000 +1000
+++ Python/importdl.c   2006-09-14 09:55:53.625000000 +1000
@@ -44,8 +44,8 @@
                return NULL;
        if (p == NULL) {
-                  "dynamic module does not define init function
-                            shortname);
+                  "dynamic module (%s) does not define init function
+                            pathname, shortname);
                return NULL;
         oldcontext = _Py_PackageContext;

More information about the Python-list mailing list