Steve Holden wrote:
Traceback (most recent call last):
  File "cgi.py", line 2, in ?
    import cgi
  File "/c/steve/cgi.py", line 12, in ?
    main()
  File "/c/steve/cgi.py", line 6, in main
    form = cgi.FieldStorage()
AttributeError: 'module' object has no attribute 'FieldStorage'

Ha! There's a naming confusion between the imported cgi module and your main program. Rename it to something else and all should be well (or at least better ;-)

I suspected that too, Steve, but why would it be showing the library cgi.py in the traceback if he had a local one with the same name? Weird. (Unless, as I wondered in my redundant reply, the traceback he posted wasn't the real traceback...)

-Peter
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to