Setting up agile development with Python/Komodo (part 4)

This is the fourth and final part in a series of tutorials on setting up a Python project in Komodo Edit for agile development. In part 1, we set up automated testing, and started our automated build script. In part 2, we added building an executable and setup program to our build script. In part […]

Using late binding from C++

If you're working on Windows, COM is a great way to let Python and C++ collaborate. When you're consuming a COM server written in C++ from Python, the win32com module makes this a snap. Consuming a Python COM server from C++, however, can be a pain, because you have to use late binding. Note: I've […]

Setting up agile development with Python/Komodo (part 3)

This is the third part in a series of tutorials on setting up a Python project for agile development in Komodo Edit. In part one, we set up unit testing and started our automated build script. In part two, we created scripts to build an executable and installer. In this part, we're going to use […]

IJET-19 call for proposals

The call for proposals for IJET-19 has just gone out. If you're planning on attending IJET next year (you are, aren't you?), consider giving a presentation as well! I've given three IJET presentations so far, and they've all been fun and learning experiences. Of course it's vulgar to mention money, but the exposure did win […]

Setting up agile development with Python/Komodo (part 2)

This is the second part in a series of tutorials to setup up agile development in Python/Komodo. In the first part, we created a project, set up unit testing, and started our build script. In this part, we're going to start developing a simple wxpython application, and add building an executable via py2exe and a […]

My volunteer translation for a J-E translation workshop

A few months back, I volunteered to do a translation for a Japanese-to-English (J-E) translation workshop. The idea was to go over several translations of a book passage, critiquing and hopefully learning something from them. The field was management consulting, which I know next to nothing about, but I figured it would be good critique […]

Setting up agile development with Python/Komodo (part 1)

This will be a series of tutorials showing how to set up for agile development in the Komodo Edit environment. By the end of the series, we will have our Komodo project set up with the following: Automated unit testing via hot key Automated build cycle, that: Runs unit tests (nose) Builds an executable (py2exe) […]

Do you have to speak a language well to translate it?

The short answer is, it doesn't hurt. Of course it's not an absolute prerequisite. As a counterexample, lots of people put out fine translations of dead languages — languages nobody speaks any more. But speaking a language well implies the ability to quickly comprehend and manipulate a rich variety of language constructs. Knowing the language […]

Mocking wxpython for unit testing

Unit testing GUI code is usually a pain, but Python makes this so easy that I laugh with glee every time I do it. My approach is to declare my own fake versions of the main wxpython widgets, and then overwrite the wx namespace with my fake classes. This idea is basically borrowed from a […]

Encoding an output stream in Python

Sometimes you may need to encode an output stream. Maybe you're writing to a file and you need it in a certain encoding, or to cStringIO.StringIO, which only takes byte strings. Or basically when you're dealing with the dreaded UnicodeEncodeError. You can avoid this by wrapping your output stream in a class (i.e. a decorator) […]