Skip to content. | Skip to navigation

Personal tools
Log in
You are here: Home The Gadfly 2

The Gadfly 2

Changing my SQL philosophy...maybe.

Okay, so when I was growing up, my grandparents of all people let me watch the Fly 2 because of this new thing called cable television.  It was a disturbing, sad, depressing movie that has stuck with me.  That has nothing to do with this post, except the sad and depressing part.  I'm only kidding of course.  Hopefully, this will be the answer I was looking easy to integrate into Zope relational database that is not overly bloated with features.  Gadfly, which is written entirely in Python, is actually included with Zope and used in some examples so I'm eager to see if it will satisfy my needs for a table based, sortable, filterable, method of data retrevial....we'll see.

<RandomThought>I wish Plone had a spell check that worked out of the box....or at least a way to not override the right-click spellchecker built into Firefox...feature request for later :)</RandomThought>

Anyway, maybe some insight into what I want to do with the database would be helpful.  The biggest part of this project (because the team at Plone and Zope have already done most of the other work for me...thanks!) is going to be having a GUI that will be able to create chord charts using a ton of small (2 char?) string fields above the long lyric string fields (500 chars?).  The small string fields will be used to place chords above the lyrics with dropdowns for the various chord types (i.e. min, dim7, +6, etc).  The empty chord fields will be used for whitespace, or placeholders.  All this data will be stored in tables and be retrieved as text and then formatted as a report and printed out as a pdf (the thought just came to mind to distroy this feature because it may not be needed...maybe we can just print the rendered text page, as an HTML page???)  Anywho, we'll see if Gadfly is the answer but....

Issues Already

It's true, I'm already having issues with Gadfly.  I'm sure the Zope version probably works fine, but I'd like to try the normal Python version on my desktop first to get a feel for it.  Like test driving a car before pimping it out.  I can't pimp it out at the dealership before I know it's exactly what I want, that would be a waste of time.  So, I'm able to...

>>>import gadfly

...without issue, but when I (as following the instructions to create a database)...

>>>connection = gadfly.gadfly()

...I get this error...

from gadfly import sql, bindings
File "/usr/lib/python2.7/site-packages/gadfly/", line 64
[create, view, name, namelist, as, selection] = l

(The last character is the lowercase letter 'L")

So I guess it's time to go diving into to see if I can fix the syntax.


Okay, so I found this link:

It looks like "as" is a reserved word after Python 2.6 or so.  So, I added the underscore to each as in as per the link.  I am now able to make a connection, but my trust in Gadfly is thinning out.  Someone suggested SQLite.  I may do a quick search to see if there is a handy Zope SQL Connector that someone has written.

Document Actions
Other Things