This is a list of guides I wrote on this blog. They are setup guides for some technologies, or ways to implement best programming practices.
Other educational content: a list of factoids I use in #python on Freenode
Spawning subprocesses smartly and securely
As part of your code, you may be inclined to call a command to do something. But is it always a good idea? How to do it safely? What happens behind the scenes?
Python Apps the Right Way: entry points and scripts
There are multiple ways to write an app in Python. However, not all of them provide your users with the best experience.
One of the problems some people encounter is writing launch scripts. The best way to handle this is the Entry Points mechanism of Setuptools, and a __main__.py file. It’s quite easy to implement. If you’re interested, read on to learn more!
Setting up a Python development environment
Setting up Python is usually simple, but there are some places where newcomers (and experienced users) need to be careful. What versions are there? What’s the difference between Python, CPython, Anaconda, PyPy? Those and many other questions may stump new developers, or people wanting to use Python.
Unix locales vs Unicode (‘ascii’ codec can’t encode character…)
You might get unusual errors about Unicode and inability to convert to ASCII. Programs might just crash at random. Those are often simple to fix — all you need is correct locale configuration.
Deploying Python Web Applications with nginx and uWSGI Emperor
You’ve just written a great Python web application. Now, you want to share it with the world. In order to do that, you need a server, and some software to do that for you.
The following is a comprehensive guide on how to accomplish that, on multiple Linux-based operating systems, using nginx and uWSGI Emperor. It doesn’t force you to use any specific web framework — Flask, Django, Pyramid, Bottle will all work. Written for Ubuntu, Debian, Fedora, CentOS and Arch Linux (should be helpful for other systems, too). Now with an Ansible Playbook.
Revision 5 (2017-04-29): Better module specification description, environment variable configuration info
Structuring and automating a Python project with the Python Project Template
To create a project that other people can use and contribute to, you need to follow a specific directory structure. Moreover, releasing a new version should be as simple and painless as possible. For my projects, I use a template that has the structure already in place, and comes with automation for almost every part of a release.
Adventures in Windows: Music Player Daemon
Recently, I had to reinstall Windows. One of the things I had to set up was MPD, the Music Player Daemon.
This is a short guide on how to do this.