Casey Hawthorne wrote:
> Is there a way to determine -- when parsing -- if a word contains a
> builtin name or other imported system module name?

As David pointed out, the keys in sys.modules are the names of all 
imported modules throughout the interpreter (but not just those in the 
current scope).

Likewise, do "import __builtin__" and you'll have access to all the 
builtin names, which you could test against using "hasattr(__builtin__, 
name)".

-Peter
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to