2.2 open
Greg Ewing
greg at cosc.canterbury.ac.nz
Sun Mar 24 22:41:40 EST 2002
Robin Becker wrote:
>
> So the question now is, how do I tell if __import__ is the built in one
> even if the import system is not fully initialized.
You could compare its type with what you really
should have been comparing it with in the
first place:
import types
if type(__import__) == types.BuiltinFunctionType:
...
--
Greg Ewing, Computer Science Dept, University of Canterbury,
Christchurch, New Zealand
To get my email address, please visit my web page:
http://www.cosc.canterbury.ac.nz/~greg
More information about the Python-list
mailing list