Sysadmin

Creating an executable file from a python script

3 minute read Published:

Recently I wrote about how to deploy a python script without virtualenv. This method takes advantage of the idea of installing the script’s dependencies in a local directory using pip and wraps them and our code with a simple shell script. The result was good, but you still needed to deploy a directory with your source code, another one with the dependencies and the wrapper script with those paths fixed, which will be the one to run.

Deploying a python script without virtualenv

2 minute read Published:

Lately I’ve been writing a lot of python to script some common processes in a large infrastructure. Those scripts require some python libraries which are not part of the standard library nor installed by default in all systems. For example, I love how docopt manages the arguments of a python script, or using the YAML format for my config files instead of INI. During the development stage, I usually manage those dependencies using pip and virtualenv, but I would like my deployment to require only python3 installed in the remote machine.

Enhance SQLite output

2 minute read Published:

I’ve been doing some development in Baoqu with SQLite recently, and one of the problems I’ve faced is that the default output from a query in the SQLite client is too basic, almost confusing: sqlite> select * from users; 1|Ramira 2|Maria 3|Yamilo 4|Mario 5|PĂ©rez-Reverte 6|Yisus 7|Miguel 8|Marta 9|andy 10|lol 11|lol2 12|lolaso That’s a simple query, let’s complicate it a little more: sqlite> select * from users as u inner join users_circles as uc on u.