[issue9506] sqlite3 mogrify - return query string

2010-08-04 Thread Kurt Schwehr
New submission from Kurt Schwehr schw...@ccom.unh.edu: Psycopg2 has a mogrify method on the cursor that returns the string that would be sent to the database for an execute. Any chance that could be added to pysqlite? It's definitely helpful for debugging and is a fantastic tool when

Pulling arrays from database for plotting

2009-08-12 Thread Kurt Schwehr
Hi all, What's the best way to pull arrays from a database for plotting? Right now, this is what I do, but can it be done simpler / more efficiently? ipython -pylab import sqlite3 cx = sqlite3.connect('20080407.decimated.db3') a = array( [tuple(row) for row in cx.execute('SELECT cg_offset,

A superclass using a child classes' methods

2009-06-24 Thread Kurt Schwehr
I'm trying to build an OO system for encoding and decoding datapackets. I'd like the parent class to have an encode function that uses each of the child classes' packing methods. It appears that this works for attributes of children accessed by the parent, but not for methods. Is that right?

Re: A superclass using a child classes' methods

2009-06-24 Thread Kurt Schwehr
Jean-Michel, Thanks for the excellent response setting me straight. Now to figure out what dumb thing I did to make my code not work... -kurt On Jun 24, 12:23 pm, Jean-Michel Pichavant jeanmic...@sequans.com wrote: Kurt Schwehr wrote: I'm trying to build an OO system for encoding