This post is only loosely Python related and not at all Plone related. This post is only loosely Python related and not at all Plone related, but I thought folks might enjoy hearing about Vagrant and Puppet because these tools may help you do your Plone and Python jobs better. For the past couple weeks […]
Calling Scrapy from a Python script
When you need to do some web scraping job in Python, an excellent choice is the Scrapy framework. Not only it takes care of most of the networking (HTTP, SSL, proxies, etc) but it also facilitates the process of extracting data from the web by providing things such as nifty xpath selectors. Scrapy is built […]
Mozilla and PyPI
VM setup for kitsune The last time I wrote about PyPI some folks mistook the subject to be PyPy, so let me be clear: this article is about the Python Packaging Index. I recently began doing some volunteer work for Mozilla[1], working on a virtual machine setup to make kitsune development easier (kitsune is the […]
Dealing with the Python Import Blackbox
Turns out, this does not work reliably, in fact it will only work when packages are involved. I originally wrote the core for Flask extensions and it appeared to work, but I never verified that it works without extensions being involved. And in fact the module cleanup breaks it. Apparently Python does clean it up […]
Django Forms with Multiple Inheritance
Sometimes you want to validate only parts of a Django form. A use case for this would be a user profile. A user may have an extensive user profile, but sometimes you only want to validate a subset of the form fields, e.g. the city and the phone number, when providing a profile edit form. […]
We were personal co-organizers of the First Python Day Uruguay
On August 20th 2011 we’ve celebrated the first Python Day Uruguay. The audience reached more than 200 Pythonistas coming mainly from Uruguay and Argentina. That’s an amazing number counting on a population of about 3 million people in Uruguay. The event shipped a total of 18 talks organized into 30 minute presentations and mid-sized lighting […]
You’re So Vain, So Why Not Use Vanity?
A few months ago I created a package called Vanity A few months ago I created a package called Vanity[0] that provides easy access to package download statistics from PyPI. You can find the source code here: https://github.com/aclark4life/vanity. I love this tool, and I use it all the time to gauge the value of a […]
Show MySQL Storage Engines
If you have ever wanted to know the storage engine type of every table in one of your MySQL databases, you know how tedious that can be. I have written a Python script that will simplify that task. You can get it on Github. Usage: $ ./show-engines.py or $ python show-engines.py Download: https://github.com/dbrgn/MySQL-Show-Storage-Engines
Be careful with exec and eval in Python
One of the perceived features of a dynamic programming language like Python is the ability to execute code from a string. In fact many people are under the impression that this is the main difference between something like Python and C#. That might have been true when the people compared Python to things like C. […]
In Defense of PyPI
Everyone on the Python Planet is probably already familiar with Peter Fein’s recent article about PyPI. Everyone on the Python Planet is probably already familiar with Peter Fein’s recent article about PyPI use (or lack thereof). But in case not, particularly striking was the number of folks who joined the “PyPI bashing” in the comments. […]
Common Mistakes as Python Web Developer
A few weeks ago I had a heated discussion with a bunch of Python and Open Source people at a local meet-up about the way Python’s path joining works. I was always pretty sure that people are aware of how the path joining works and why it works that way. However a bit of searching […]
Use easy_install under Arch Linux or Ubuntu
If you want to use Python’s easy_install, you need to install an additional package. Under Arch Linux, you need python2-distribute. $ pacman -S python2-distribute If you’re an Ubuntu user, install python-setuptools. $ apt-get install python-setuptools
Why some software project websites suck and others don’t
Today I gave some thoughts to what distinguishes a good software project website from a bad software project website (especially for open source projects). I came up with a few must-have criteria for a good software project website: On the very first page, state what the software does, and what the goal of the project […]
April 1st Post Mortem
This year I decided to finally do what I planned for quite some time: an April’s fool joke. (I did contribute a bit to PEP 3117, but that does not count). This year I decided to make a little joke about Python microframeworks (micro-web-frameworks?) and wrote a little thing, and created a website and screencast […]
No, Really, You Can Just Use Buildout To Install Plone
This is a follow up to my ‘Getting Excited about Plone as Eggs’ post. This is a follow up to my Getting Excited about Plone as Eggs post. Generally speaking, the recommended and supported way to install Plone is via the installers, e.g. the Unified Installer. Obviously, if you want things to Just Work™ you […]