Is wsgi ready for prime time?

Josiah Carlson josiah.carlson at sbcglobal.net
Thu May 17 15:55:09 EDT 2007


Ron Garret wrote:
>>>> wsgiref.util 
> Traceback (most recent call last):
>   File "<stdin>", line 1, in <module>
> AttributeError: 'module' object has no attribute 'util'
>>>> wsgiref.headers
> Traceback (most recent call last):
>   File "<stdin>", line 1, in <module>
> AttributeError: 'module' object has no attribute 'headers'
>>>> wsgiref.handlers
> Traceback (most recent call last):
>   File "<stdin>", line 1, in <module>
> AttributeError: 'module' object has no attribute 'handlers'

wsgiref is a package.  In order to access submodules/packages, you must 
import them.

 >>> import wsgiref
 >>> wsgiref.util
Traceback (most recent call last):
   File "<stdin>", line 1, in <module>
AttributeError: 'module' object has no attribute 'util'
 >>> import wsgiref.util
 >>> wsgiref.util
<module 'wsgiref.util' from 'c:\python25\lib\wsgiref\util.pyc'>
 >>>

It's almost magic.

  - Josiah



More information about the Python-list mailing list