is there a way to warn about missing modules *without* running python?

Terry Reedy tjreedy at udel.edu
Sat Jun 5 15:24:55 EDT 2010


On 6/5/2010 9:42 AM, lkcl wrote:

> if someone could perhaps explain this (in a different way from me), in
> the context of "python the programming language" and "python the
> http://python.org interpreter", i.e. having absolutely nothing to do
> with pyjamas, i would be most grateful, and it would benefit that
> user's understanding of python.

I do not know the background of your user, but here is my try:
Loading a Python module at runtime is like loading a song, picture, or 
web page. An import statement is like a web page link. If the name of 
the resource is misspelled, or if the resource is not available when 
requested, it cannot be loaded and the requesting progran can only 
report an error. ImportError is equivalent to http's "40x: not found" 
message. A web link that works one time may not work another time.

Terry Jan Reedy




More information about the Python-list mailing list