[Patches] [ python-Patches-637835 ] Modulefinder doesn't handle PyXML
noreply@sourceforge.net
noreply@sourceforge.net
Thu, 14 Nov 2002 00:50:14 -0800
Patches item #637835, was opened at 2002-11-13 17:16
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=637835&group_id=5470
Category: Demos and tools
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Thomas Heller (theller)
Assigned to: Nobody/Anonymous (nobody)
Summary: Modulefinder doesn't handle PyXML
Initial Comment:
The attached patch adds a mechanism to handle cases
like PyXML, where a module injects itself into
sys.modules under a different name. With a special
version of py2exe I was able to freeze some of the
PyXML test scripts, although I didn't succeed with
freeze - the extension modules did not load.
----------------------------------------------------------------------
>Comment By: Thomas Heller (theller)
Date: 2002-11-14 09:50
Message:
Logged In: YES
user_id=11105
I call
ReplaceModule("_xmlplus", "xml")
and then run ModuleFinder on my script.
Only when the module named "_xmlplus" is loaded by
load_package, the replaceModule hook is triggered. With the
above call, it is then inserted into ModuleFinder's modules
instance var under the name "xml", and not "_xmlplus". This
mirrors what is done by _xmlplus/__init__.py file.
Now that I think over it, probably ReplaceModule should be
renamed to ReplacePackage ...
----------------------------------------------------------------------
Comment By: Martin v. Löwis (loewis)
Date: 2002-11-14 00:44
Message:
Logged In: YES
user_id=21627
How is this supposed to be used? Do you add to
replaceModuleMap only if the replacement module is present?
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=637835&group_id=5470