A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2004-July/046460.html below:

[Python-Dev] Fix import errors to have data

[Python-Dev] Fix import errors to have data [Python-Dev] Fix import errors to have dataJim Fulton jim at zope.com
Tue Jul 27 23:55:26 CEST 2004
Guido van Rossum wrote:
>>Nope. It doesn't handle packages.
>>
>> >>> import compiler.ast
>> >>> import imp
>> >>> imp.find_module('compiler.ast')
>>Traceback (most recent call last):
>>   File "<stdin>", line 1, in ?
>>ImportError: No module named compiler.ast
> 
> 
> The docs explain how to handle that though.

Sure.  But it would be better to have an API
that you could just call to find out if a module is present.
This could be implemented on top of find_module.

Jim

-- 
Jim Fulton           mailto:jim at zope.com       Python Powered!
CTO                  (540) 361-1714            http://www.python.org
Zope Corporation     http://www.zope.com       http://www.zope.org
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4