Thomas Heller wrote: > Jim Fulton <jim at zope.com> writes: > ... >>Hm, perhaps it would be better to provide an API (if there isn't one >>already) to test whether a module is present. > > > Doesn't imp.find_module do this? On Windows: 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 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
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