Code: Alles auswählen
import cgi
formular=cgi.FieldStorage()
file=formular['datei'] #rausholen der Unterinstanz von FieldStorage, die alles zur Datei beinhaltet.
real_file=file.file #wirkliches Dateiobjekt
Code: Alles auswählen
['FieldStorageClass', '_FieldStorage__file', '_FieldStorage__write', '__doc__', '__getattr__', '__getitem__', '__init__', '__len__', '__module__', '__repr__', 'bufsize', 'disposition', 'disposition_options', 'done', 'file', 'filename', 'fp', 'getfirst', 'getlist', 'getvalue', 'has_key', 'headers', 'innerboundary', 'keep_blank_values', 'keys', 'length', 'list', 'make_file', 'name', 'outerboundary', 'read_binary', 'read_lines', 'read_lines_to_eof', 'read_lines_to_outerboundary', 'read_multi', 'read_single', 'read_urlencoded', 'skip_lines', 'strict_parsing', 'type', 'type_options']
real_file hat übrigens alle methoden wie ein wirkliches file-Objekt, des wegen müsste die Steuerung wohl logischerweise über file laufen. Kann mir jemand helfen?