[Tutor] SQLite3 DB Field Alphabetizing
David Hutto
smokefloat at gmail.com
Tue Oct 12 15:38:40 CEST 2010
On Tue, Oct 12, 2010 at 9:02 AM, David Hutto <smokefloat at gmail.com> wrote:
> Sorry about that, I there might have been an obvious reason.
> *Note that the I invented the *.bob file before you replied.
Apparently, I am to .bob, what Al Gore is to the internet.
>
> import sqlite3 as lite
> class db(object):
> def onNewProjSQLDB(self):
> self.con = lite.connect('/home/david/pythonfiles/pythonscripts/roughdraftapps/dataplot3/projdir/basicobjb.bob')
> self.cur = self.con.cursor()
> self.orderbygname = self.cur.execute('''select * from %s order by
> graphname''' % ('projectbob'))
> self.liorder = []
> for graphname in self.orderbygname:
> self.liorder.append(str(graphname[0]).lstrip('u'))
> print self.liorder
> # Save (commit) the changes
> self.con.commit()
>
> self.cur.close()
> self.con.close()
> db = db()
> db.onNewProjSQLDB()
>
More information about the Tutor
mailing list