[Tutor] CGI File Uploads

ALAN GAULD alan.gauld at btinternet.com
Sun Feb 28 16:53:56 CET 2010



> Alan, i don't know how to use it in this case.
> 

> import cgi
> form = cgi.FieldStorage()
> fileitem = form['file']


> Function dir() lists all functions in a module, i could only use it for "cgi" 

It will list all the names in any kind of object not just a module.
If you type the code above at the >>> prompt you should be 
able to do:


>>> import cgi
>>> form = cgi.FieldStorage()
>>> help(form)

OR, You could go more directly using

>>> import cgi
>>> help(cgi.FieldStorage)


HTH

Alan G.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20100228/9442bd62/attachment.html>


More information about the Tutor mailing list