Some Python essentials
I was leaving a comment on another blog about some key tools I found useful for Python development, and I though they were worth mentioning here. I have to warn you that these are Python utilities I found useful in 2002. However, as is true with any good tool, I feel they’re still relevant.
- Python Logging (PEP 282, part of standard as of Python 2.3)
- It’s part of the standard now so finding it wasn’t as big of a deal as back when we were using Python 2.2.1. But having a robust message logger class is one of those things that may seem unnecessary but will be worth it’s weight that day you are able to do something in 20 minutes instead of the week and a half it would have taken you otherwise because the logger class already supported it. Never code your own logger, at the most code a generic wrapper so you could turn off the logger if needed for performance.
- Simplified Wrapper and Interface Generator is an amazing tool for gluing together C/C++ to TCL, Python, Perl, Guile, Java, Ruby, C#, CLISP, as well as many others. Everyone should have SWIG in their toolkit because at some point you are going to find it a lifesaver. If you have a language that can support C/C++ code (SystemVerilog, Specman e) then you can connect it to something else using SWIG.
- Interactive Python GUI that is now part of the wxPython cross-platform GUI toolkit. If I recall correctly it’s the sample application. It has some neat features like a namespace browser (PyFilling). It looks like since I’ve last look at it the developer has taken a restructuring approach to build more of a complete IDE called Py. You can still run PyCrust on it’s own though.