Search
Code Directory
 ASP
 ASP.NET
 C/C++
 CFML
 CGI/PERL
 Delphi
 Development
 Flash
 HTML
 Java
 JavaScript
 Pascal
 PHP
 Python
 SQL
 Tools
 Visual Basic & VB.NET
 XML
New Code
Database Workbench Pro 5.4.6
Extensibility Studio 3.0
Bytescout Spreadsheet SDK 3.0.0.1699
Magento 2 Admin Mobile App 1.0
Data Compare for MySQL 5.3
ODBC Driver for Zoho CRM 1.3
ODBC Driver for SugarCRM 1.3
Bytescout PDF To HTML SDK 9.0.0.3079
Azizi search engine script PHP 4.1.10
TaxiSoftr - Taxi Booking & Dispatch Software 1.0
VisualNEO for Windows 18.08.31
AnyMap JS Maps 8.4.0
ODBC Driver for MailChimp 1.3
OrgChart JS 3.0.7
AnyStock Stock and Financial JS Charts 8.4.0
Top Code
SQL to Java Code Generator 2.6.7
luxSQL 1.0
Ping Pong Game Code Script 1.1
Dansie Shopping Cart Mall Version
Ozone - Java OODBMS 1.2.1.beta
RabbitBB - Online Web Storage Project 20060513
PHP Choral Music Library 1.5
Top Rated
Output Messenger 1.8.0
Aliexpress Clone- Ec21 Script 1
Indiegogo Clone 3.0
Advanced MLM Software 1.2
Online Food Ordeing System 1.0
PHP Image Resize Script 1.0
Best Spotify Clone 1.0
Get Random Record Based on Weight 1.0.0
PHP Point of sale 10.0
Travel Portal Script 9.29
Excel Add-in for Bigcommerce 1.6
Magento Product Designer 1.0
OFOS - Just Eat Clone Script 1.0
PrestaShop Upload Images Module 1.2.1
Trading Software 1.2.4
resultset.py 
File ID: 66679






resultset.py 
Download resultset.py http://code.activestate.com/recipes/163605-resultsetpy/?in=lang-pythonReport Error Link
License: Freeware
Downloads: 0
Submit Rating:
resultset.py  Description
Description: I created this class and related functions because I like accessing database results by field name rather than field number. Accessing by field number has many problems: code is less readable, code gets broken when field positions change or fields are added or deleted from the query, etc.

This class should have little overhead if you are already using fetchall().
It wraps each result row in a ResultRow class which allows you to retrieve results via a dictionary interface (by column name). The regular list interface (by column number) is also provided.

I can't believe the DB-API 2.0 api didn't include dictionary-style results. I'd love to see the reasoning behind not requiring them of database connection classes.

License: Freeware

Related: Database

O/S:Windows

Downloads: 0



More Similar Code

MailForm.py works with python supported websites and this CGI script allows you to create web based user friendly forms to enable the visitors on your website to contact you in matter of minutes. You can specify as many fields with forms as you want to add and can include error monitoring modules to remind misssing values on required fields. Emails can be sent to the address you specify with in forms.



Rest-in-py project has been moved to BitBucket

https://bitbucket.org/fundacionctic/rest-in-py

REST in PY ia a Python library to ease the publication of REST-style web services in Django applications, specially (but not...



SE|PY is an ActionScript editor written in python, wxPython and using scintilla for text highlight, code collapsing. some features: snippets panel, functions panel and much more.
Contain also Flush



AJAX JDBC ResultSet in Javascript. Uses XMLHTTP to send xml server data to a web browser HTML form with no refresh, reload or submit (like Google Suggest). Data can be SQL, object relational map (like Hibernate), XML, other mapping (like SOAP)



py-autopotools is a tool for i18n and l10n which automates a lot of the common tasks performed on po files. Create new files, delete or merge comments, file positions, and translations seperately, create default translations - pocreate does it all.



Add all dirs under folder to sys.path if any .py files are found.
Use an abspath if you'd rather do it that way.

Uses the current working directory as the location of using.py.
Keep in mind that os.walk goes all the way down...



I implemented dimensions.py perhaps eight years ago as an exercise and have used it occasionally ever since.

It allows doing math with dimensioned values in order to automate unit conversions (you can add m/s to mile/hour) and...



This is an example of how to use vlc.py . It records an mp3 file from an online audio stream, using the track announcements to write an accompanying cue file.



This program expands upon my Do.py program (Recipe: 577439). Instead of doing one expansion
for the entire comand, it performs an expansion on each argument. It uses the Do.py program
preserving macro definitions.



This script identifies every chr(xx) call in a script (being xx an integer) and replaces it with a constant byte string. For example: print chr(13) + chr(255) in the input .py file gets translated into '\n' + '\xff' on the output .py file, not...

User Review for resultset.py
- required fields
     

Please enter text on the image