I’ve come to love the Python language for its elegant syntax combined with powerful constructs like comprehensions. Jython allows me to take Python to the next level by allowing it to interact with my existing JVM-compatible code. Now I want to extend that even further and allow myself (and you, of course) to integrate Jython with Griffon, a framework for building desktop applications in Groovy.
Introducing the Jython plugin for Griffon
The Jython plugin enables compiling and running Jython code on your Griffon application. You don’t even need to install Jython manually. A Jython REPL is available with access to your Groovy/Java classes
Continue reading →
Ever since I’ve moved to my own server for my websites, I’ve wanted to reduce the number of HTTP requests per user as much as possible. Here is how I (and you) can use Python to shave 1 more request off that number.
I can do this (and remove a DNS lookup) by updating my Feedburner count using an automated script on my server instead of having each client request it.
Using the FeedBurner Awareness API
Most of the time you only care about getting your total subscribers at the moment. The FeedBurner Awareness API is far more capable than just doing that, but we’re going to keep it simple today.
Continue reading →
I recently switched to hosting all of my own websites. While it is liberating to have much more control over my web host, it begs for more maintenance time and better tools to help you monitor your server.
While browsing my GitHub account I came across Mark Sanborn‘s site monitoring script and thought: “Hey this is a good idea, let’s see what I can make of it”. I have been meaning to post more Python here so I updated his code a bit and thought I’d share it with you. I hope you have ideas for improvements.
Checking site availability with Python
I didn’t feel that this script was big enough to go full OO with it, but if you want to add to it, fork the gist on GitHub and provide a link in the comments. You know what’d really be cool is if someone used timeit to get the response time and set thresholds for when the site is too slow.
Continue reading →