Using Font Awesome in PyGObject applications

For those who doesn't know about Font Awesome:

Font Awesome is a full suite of 479 pictographic icons for easy scalable vector graphics on websites.

—Font Awesome GitHub repository

"Websites"... well... you can use it in Gtk+ applications too

In this example I'll use PyGObject, but any language that can use Gtk+ should work. We will use the Pango Markup Format which is very similar to HTML. With it, we can:

  • Put Font ...

Python PEP 3101 and print() Overview

Python PEP 3101 specifies the string formatting function that replaces the old % operator on strings. In addition, PEP 3105 also specifies the behavior of the print(), now standard in Python 3. This post shows a small cheat-sheet or overview of both.

# Overview of PEP 3101 and PEP 3105
# In Python 2.7 use with:
from __future__ import print_function

# Print to stderr
>>> from sys import stderr
>>> print('ABC', file=stderr)
ABC

# Print without a newline
>>> print ...

Autodeploy a GitHub-hosted Pelican blog

If you have a Pelican blog or static site and you version control it using GitHub, this tutorial shows you how to auto deploy it to your web server each time you push your repository using webhooks.