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-August/046635.html below:

[Python-Dev] Proposed Python api for testing whether a module exists

[Python-Dev] Proposed Python api for testing whether a module exists [Python-Dev] Proposed Python api for testing whether a module existsBarry Warsaw barry at python.org
Mon Aug 2 20:01:23 CEST 2004
On Mon, 2004-08-02 at 12:32, Jim Fulton wrote:
> I propose to add the following function to the imp module:
> 
>    exists(module_name)
> 
>       Test whether the named module can be found.
> 
>       This method should be used when you want to perform
>       alternate actions depending on whether a module is available.
> 
>       Returns True of the module can be found and False otherwise.
>       A True return value does not guarentee that the module will be
>       importable.  The module will not be imported as a result of
>       calling exists, but parent modules may be.
> 
>       If a dotted module name is given, then parent modules will be
>       imported if they haven't already been imported.

+1, but shouldn't "parent module" really be spelled "parent package"?

-Barry

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 307 bytes
Desc: This is a digitally signed message part
Url : http://mail.python.org/pipermail/python-dev/attachments/20040802/a6edcd8c/attachment.pgp
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