On Oct 17, 2007, at 5:28 PM, Kenneth Kixmoeller/fh wrote:

>> But then again, in Python I miss being able to type out a raw SELECT
>> statement and get a cursor of results.
>
> I *really* miss that, too. So much so that I sometimes keep VFP open
> so i can pass the same SQL through it so I can see the data for  
> testing.

        I have a quick little script that returns a MySQL cursor object for  
the database I pass to it, and then do something like this in the  
Dabo Command Window:

import getcursor
crs = getcursor.connect("somedatabase")
x = crs.execute
f = crs.fetchall
browse = dabo.ui.browse

        ... and from then on I can just run:

x("select fld1, fld2 ...")
browse(f())

x("select fld4, fld5 ...")
browse(f())


-- Ed Leafe
-- http://leafe.com
-- http://dabodev.com




_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/[EMAIL PROTECTED]
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to