On Friday, October 28, 2011 3:02:11 PM UTC-4, Ross Peoples wrote:
>
> I was originally going to suggest checking for FieldStorage rather than 
> StringIO, but wasn't sure if I wanted to suggest adding another import (of 
> cgi).


Maybe hasattr(file, 'file') would be sufficient. I'm not sure file has to 
or will be a StringIO object specifically, so probably better to try to 
positively identify the FieldStorage case rather than attempt to positively 
identify the non-FieldStorage case.

Anthony 

Reply via email to