Automatic import PEP

Sybren Stuvel sybrenUSE at YOURthirdtower.com.imagination
Sat Sep 23 08:25:37 EDT 2006


Connelly Barnes enlightened us with:
> I wrote the 'autoimp' module [1], which allows you to import lazy modules:
>
> The main point of autoimp is to make usage of the interactive Python
> prompt more productive by including "from autoimp import *" in the
> PYTHONSTARTUP file.

Sounds like a great idea.

> I have also found "autoimp" useful in writing normal Python
> applications; one can use "from autoimp import *" at the top of a
> Python source file and thus have all Python modules available to
> that source file

That sounds like a source of new bugs to me. Besides that, you have no
overview at all of which modules are used by the program. It also
prevents automated checking of that using pylint and friends.

Sybren
-- 
Sybren Stüvel
Stüvel IT - http://www.stuvel.eu/



More information about the Python-list mailing list