Python file upload

Bjarne Christiansen bjarne_christiansen at hotmail.com
Wed Jun 26 09:26:20 EDT 2002


Hi Fredrik,

> > #!c:\Python\python -d
>
>do you really need optional debug output from the parser?
>maybe you meant "-u"?

It works with the -u option. Thanks a lot - you are the best!!!
Well, I always use the -d option as default while in testing phase...

Best Regards,
~Bjarne

>
> > I have changed the script to the following:
> > ...
> >   item = form["filename"]
> >   if item.file:
> >     data = item.file.read()
> >     f = open("file1.jpg","wb")
> >     f.write(data)
> > ...
> >
> > But I still run into the same problem, any ideas?
>
>how much data is missing?  if it's a couple of kilobytes missing
>at the end, you might need to explicitly close the file:
>
>     f.close()
>
></F>
>
>
>--
>http://mail.python.org/mailman/listinfo/python-list


_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp.






More information about the Python-list mailing list