Python interpreter tab completion on OS X

by Brian on October 9, 2011

This is mainly for me own reference, but it is probably something that other people will find useful. If you attempt to use the rlcompleter module on the Mac you’ll find that tab completion does not work correctly. Apparently this is because Apple ship a neutered version of readline.

To get completion working you have to use a different argument to readline.parse_and_bind(). The base example uses:

readline.parse_and_bind("tab: complete")

Change that line to:

readline.parse_and_bind ("bind ^I rl_complete")

Old but interesting news

by Brian on September 27, 2011

I’ve spent a fairly big chunk of my professional career building public websites for a number of clients. One of the things that comes up again and again is search engine optimisation.

Surprisingly there is very little coverage of this is in business and marketing journals. Patrick Reid wanted to start raise awareness, and needed my technical help in preparing a paper. We finished it up earlier this year and it was published in the Journal of Strategic Management Education.

Corporate Communications in the FTSE 100: Evidence using Search Engines
JSME Vol 7: Issue 1, 2011
Patrick Reid (Greenwich School of Management, UK), Brian Lyttle (LiquidHub, Inc., USA)

Search engines have become an essential tool for information seekers on the world wide web. This makes it critical that company websites are optimised to achieve the highest possible ranking across the major search engines, in particular Google, ensuring maximum exposure and subsequent awareness. This paper identifies key factors in search engine optimisation and then analyses a sample of the largest 10 firms listed on the London Stock Exchange.

The findings reveal a lack of adoption of best practices which will impact on their search rankings. The paper also discusses tradeoffs inherent in search engine optimisation and draws out key implications for managers and academics.

The full paper is available from the Senate Hall site.

Scrapy dependency problems with lxml

September 18, 2011

Following the recent PhillyPUG meetup I was trying to install scrapy on an old MacBook Pro running OS X 10.6 (Snow Leopard) and ran into a number of problems with the lxml dependency. This is the parser used to extract data from pages that scrapy downloads so you are not going to get very far [...]

Read the full article →

Deleting by ID (or primary key) with Fluent NHibernate

April 30, 2011

I wasn’t a big fan of so-called Fluent Interfaces but my fondness is growing as I use Fluent NHibernate on an ASP.NET MVC project. When I started on my project I checked out the repository pattern example from Google Code to see how this was being implemented. The supplied repository interface provided the following interface: [...]

Read the full article →

Custom ASP.NET MVC ActionResult classes

April 21, 2011

ASP.NET MVC provides a way for developers to extend and create custom ActionResults for controllers. Normally you return a view from a controller and the runtime goes off and hunts down the appropriate view based on the name of your action. This make sense for normal web pages but sometimes you need to build something [...]

Read the full article →

Introduction to Google App Engine with Python

April 10, 2011

Thanks to everyone who attended my talk. I hope it was useful! If you haven’t done so already please complete an evaluation form. I’ve uploaded the presentation to SlideShare and you can download a PDF from my site too. The code sample I used during the presentation is available on BitBucket, and I’m going to [...]

Read the full article →