[reportlab-users] isinstance(val, file)
Carl Karsten
carl at personnelware.com
Wed Nov 14 17:15:43 EST 2007
Andy Robinson wrote:
> On 14/11/2007, Carl Karsten <carl at personnelware.com> wrote:
>> Andy Robinson wrote:
>>> The traditional python approach would be...
>>>
>>> if hasattr(val, 'file'):
>
> Sorry. 3 straight days at a conference have fuzzed my brain. We're
> trying to detect file-like objects, so it should be...
>
> if hasattr(val, 'write')
That makes sense. Thanks.
Carl K
More information about the reportlab-users
mailing list