Eligibility: Only shows that have aired more than one season can qualify, and at least one season must have aired in the 2010s
Pelican provides support for generating content from two markup languages - [reStructuredText] (the default) and Markdown (if installed). For the most part both markup languages generate similar output, except when using Pygments to generate code blocks with syntax highlighting.
Code blocks generated from reStructuredText will use the CSS class highlight
to …
On a number of occasions I have needed to make a site available via both HTTP
and HTTPS which can result in creating two almost identical
VirtualHost
stanzas. The HTTPS stanza usually ends up being a
copy & paste of the HTTP stanza with the SSL certificate stuff tacked on to …
Following on from my last post, I have now split the LiveServerTestCase
out into its own Python package to make it easier to reuse in other projects. I
have called it wsgi-liveserver and it is the first Python package that I have
released. The package can be downloaded from PyPI …
Selenium is a really nice framework for testing web application front-ends by automating actions through a web browser, but it also requires a web server to be running so that the browser can interact with the web application. Most other tests usually interact with the code directly, so this requirement …
The Python unittest
module provides support for testing that an exception is
raised using the assertRaises()
method, but sometime we need to also test
that the exception message is what is expected. Python v2.7 introduced the
assertRaisesRegexp()
method which can be used to test exception messages
using regular expressions …
I recently wrote a short function called dict_diff()
that would take
two dicts, compare them, and return another two dicts that contain only the
differences between the original dicts (the code is available as a gist). It
works something like:
dict_diff(
{'a': {'ab': 12}, 'b': {'ba': 21, 'bb': 22}, 'c …
I have finally set up my new blog after many months of thinking about doing it.
Ever since I first heard about using static site generators for blogs the idea appealed to me. By their nature the content of blogs do not need to be generated dynamically so using static …
When creating init scripts or trying to debug services on Linux it can be handy
to know what the environment variables are for a running process. It turns out
that you can retrieve these variables from /proc
(along with lots of
other rather useful information). The environment variables are located …