Installing psycopg2 on OSX 10.5

October 25th, 2009 § 1

Just a little tip if you get stuck installing the PostgreSQL Python database adaptor as I did. Here is the error I got when running setup.py install (I downloaded the source after easy_install failed to work):

building 'psycopg2._psycopg' extension
Compiling with an SDK that doesn't seem to exist: /Developer/SDKs/MacOSX10.4u.sdk
Please check your Xcode installation

The solution is to download the psycopg2 source, then edit the setup.py - around line 426 before after “undef_macros[]” add this:

,extra_link_args = ['-L/Developer/SDKs/MacOSX10.5.sdk/usr/lib']

So that line will look like this:

undef_macros=[],extra_link_args=['-L/Developer/SDKs/MacOSX10.5.sdk/usr/lib'])) 

That is all, running ’sudo python setup.py install’ should get it working.

Share/Save/Bookmark

bullsEye - jQuery plugin to add interactive and visualization features to tables

June 9th, 2009 § 5

This plugin converts a normal table with both row and column level headers to an somewhat interactive format - it is named bullsEye because the goal was to create a targeting effect when the mouse is being moved on the cells and row and column headings. Maybe something like “draw cell lines” or “table zoom” would have been more appropriate but I don’t feel the need to agonize over names.

It was created so that large tables of data can be shown, and as the mouse is moved over the cells, visual effects are applied to the table so that the corresponding row and column header are highlighted so the current position within the table of data is revealed.

It also animates lines from the selected cell to the cell’s corresponding row and column headers, making the identification of the cell’s headers even easier to see.

When moving the mouse over a column or row header, it will highlight all intersecting cells and draw the line to them - this enables the quick identification of what cells are populated with data, as the application this plugin was developed for has intermittent data.

So for example, if the mouse is moved over a column heading, only the cells in that column that are populated with data will be highlighted and lines will drawn from each those populated cells to it’s row heading for quick visual reference.

The last bit of functionality is to either fade in or zoom in extra data on the cell level that is hidden by default when hovering over a cell.

The hover content can be HTML formatted and when it is revealed, the div used will automatically center over the selected cell and will be sized to align with total amount of cells configured - for example it can be 3 rows and 5 columns, or 3 row and 3 columns. This is visually appealing because the hover content will fit in the existing grid lines.

This is my first jQuery plugin - if anyone finds bugs or has usability suggestions let me know. I have tested it in Firefox, Opera, and Safari and the behaviors are pretty much identical.

If anyone wants to develop just fork the github repository and contact me if you have developed something you feel should be merged into the main release.

LINK: bullsEye Live Example

LINK: bullsEye Github repository and Download

Share/Save/Bookmark

OpenID + DB Authentication in Pylons is easy with RPX

June 2nd, 2009 § 8

This post will walk you through the steps I took to enable OpenID login in a project I am working on. I wanted to enable OpenID alongside existing user data stored in MySQL database.

 

Login Screen for Pylons

This tutorial actually covers more than just the subject of OpenID; it shows how to create your own custom authentication and authorization in Pylons, and how to create your own authorization decorators to protect Pylons actions.

I will assume you already have Pylons, SQLAlchemy, Mako, and MySQL installed, and will start by creating a new Pylons project project for this tutorial.

» Read the rest of this entry «

Share/Save/Bookmark

Asterisk PBX Voicemail - Configuring and Sending Emails the Easy Way

February 24th, 2009 § 7

I have been very disappointed with the voicemail emailing capabilities of Asterisk PBX. If you need to use a SMTP host, it can be a time consuming task to configure sendmail, postfix, etc, to use an external SMTP provider. And once you get the emails to send, customizing and scripting is very limited.

I wanted to be able to use SMTP, add BCC and CC recipients, have full scripting control over the message body and subject, and attach the voicemail recording in the e-mail. It seemed like writing a script and using the ‘mailcmd’ setting in the [general] section of the asterisk voicemail.conf file was a suitable way to handle this, so I took this route.

» Read the rest of this entry «

Share/Save/Bookmark

MultiSelect ComboBox Component for Ext JS

December 26th, 2008 § 9

Unable to find a ComboBox component for Ext JS that would work in an Ext Grid, permit multiple selections, and support both local and remote datasources with multiple fields (one for display, one for the index), I set out to build my own some time back.

Note: Since I began working on this some time back, a similar Ext plugin was developed by another developer: see http://lovcombo.extjs.eu/

Examples after the fold.

» Read the rest of this entry «

Share/Save/Bookmark