CGI: Uploader un fichier

Author:

 fichier, html
{filelink=16696}

#!c:/Python32/python

import cgi
import sys

def gen_html_header() :
    print "Content-Type: text/html"
    print ""

def gen_html_trailer() :
    print ""
gen_html_header()
form = cgi.FieldStorage()
try :
    file_contents = form["file"].value
    print file_contents
except :
    print sys.exc_info()

gen_html_trailer()

# Le Formulaire HTML
"""




Fichier:
"""

Livres Sur ce Sujet

[amazon_image id=”2212134347″ link=”true” target=”_blank” size=”medium” ]Apprendre à programmer avec Python 3[/amazon_image] [amazon_image id=”B005J2L260″ link=”true” target=”_blank” size=”medium” ]Apprenez à programmer en Python[/amazon_image] [amazon_image id=”2100508830″ link=”true” target=”_blank” size=”medium” ]Python : Petit guide à l’usage du développeur agile[/amazon_image] [amazon_image id=”2212127081″ link=”true” target=”_blank” size=”medium” ]Apprendre à programmer avec Python 3 : Avec plus de 50 pages de corigés d’exercices ![/amazon_image]

Leave a Reply

Your email address will not be published. Required fields are marked *