Re: Length of an Unsized Object

2009-12-31 Thread Dave Angel
Victor Subervi wrote: Hi; I have this code: sql = 'describe %s %s;' % (optionsStore, option) print sql cursor.execute(sql) descr = cursor.fetchone() if len(descr) is not None: Python complains: *TypeError*: len() of unsized object Please advise how to r

Re: Length of an Unsized Object

2009-12-31 Thread MRAB
Victor Subervi wrote: Hi; I have this code: sql = 'describe %s %s;' % (optionsStore, option) print sql cursor.execute(sql) descr = cursor.fetchone() if len(descr) is not None: Python complains: *TypeError*: len() of unsized object Please advise how to r

Re: Length of an Unsized Object

2009-12-31 Thread Victor Subervi
On Thu, Dec 31, 2009 at 12:01 PM, Stephen Hansen wrote: > On Thu, Dec 31, 2009 at 8:09 AM, Victor Subervi > wrote: > >> Hi; >> I have this code: >> >> sql = 'describe %s %s;' % (optionsStore, option) >> print sql >> cursor.execute(sql) >> descr = cursor.fetchone()

Re: Length of an Unsized Object

2009-12-31 Thread Stephen Hansen
On Thu, Dec 31, 2009 at 8:09 AM, Victor Subervi wrote: > Hi; > I have this code: > > sql = 'describe %s %s;' % (optionsStore, option) > print sql > cursor.execute(sql) > descr = cursor.fetchone() > if len(descr) is not None: > > Python complains: > > *TypeEr

Length of an Unsized Object

2009-12-31 Thread Victor Subervi
Hi; I have this code: sql = 'describe %s %s;' % (optionsStore, option) print sql cursor.execute(sql) descr = cursor.fetchone() if len(descr) is not None: Python complains: *TypeError*: len() of unsized object Please advise how to rewrite the last line so