Home » Archive by categoryPython

Automating Python documentation builds

For the hephaestus project I have been working on automating the documentation build process (which uses brilliant ‘doxygen‘ package). The doxygen run outputs HTML and LaTeX, but doesn’t do anything with it. I want: – automatic LaTeX -> PDF conversion – automatic upload to http://ndonaghy.com/hephaestus/docs I am happy,...
Continue reading »

Python: MP3 ID3 tags

Now, generally I don’t bother much with ID3 tags. This afternoon however I had occasion to create some 130 MP3s, some of which derived their proper tags from CD-TEXT, some of which did not. As a result I had to perform two tasks. Whilst this could be achieved...
Continue reading »

Dynamically generating an ISIS topology diagram in Python

Manually updating network diagrams is a right PITA. One afternoon, as an introduction to Python, I set about automating this process. I discovered the wonderful pygraphviz library and came up with a handy little script that is under 200 lines long (including comments). It automagically generates a diagram...
Continue reading »

Using pexpect to automate Python scripts

As part of my hephaestus project, I have been using pexpect to automate my integration testing. This is a rough and ready method which allows for rapid development. More rigorous unit testing is conducted in the Pythonic way: self-contained in each module. Let’s first look at this short...
Continue reading »

Multithreaded function calls in Python

Whilst working on my dissertation project, hephaestus, I had a requirement to multithread an I/O-bound function. The following code is a simplified version, simmering multiple classes into a single module for demonstration purposes. The example output at the end was generated using pexpect, which you can read about...
Continue reading »