HELP: Cannot use on program importing 4Suite

Andrew Dalke dalke at
Tue Nov 14 08:14:35 CET 2000

Ben Chang wrote in message ...
>No, this won't work. Because, the 4Suite has its own loader
>which looks for the module in the file system, loads it, and assigns it to
>local variable
>   Element = implementation._4dom_fileImport('Element').Element

Okay, so that didn't work.  As another workaround you can force
changes to sys.modules to make it look like a module was imported.

>>> import string, sys
>>> sys.modules["math"] = string
>>> import math
>>> math.find("ABCD", "C")

Or you can explicitly replace _4dom_fileImport with your own function
which knows how to get the right module.

You'll have to get a real answer from someone more knowledgeable
about the 4Suite code.  Sorry.

                    dalke at

More information about the Python-list mailing list