After this declaration of love, let’s overview where and how Python is so useful at numenGo.
Of course, I couldn’t start with anything else than our python API. To create our wrappers, we are using the excellent py++. With a few tricks, we managed to reuse our doxygen documentation for each method and class. The python API of our libs is awesome, as many features of our libs really only make sense in a scripting environment, or in a high level programming language (for example the quantities). For engineering studies, we use it for sizing, sensitivity analysis, pre and post treatment. Each time, we try to package it in reusable packages to enrich the API. Our API makes Python an excellent scientific environment, especially when you use it with numpy, scipy and matplotlib.
Another very important use of python is the processing of our models. Since we use MDA, all our models are described in a huge xml file, containing all informations related to the models (documentation, parameters, variables, icons, ports, specific methods…). Thanks to some additional libraries (lxml for xml handling, PIL libary for image handling…), we generate all images needed for our icons, create complex html documentation files (with latex equations generated on the fly as pngs). The complete packaging of our libraries for each platform is done with some python scripts.
When we need simple GUIs for small features of our software (for example, the license manager or the pathlist editor), we program them in python using Tkinter (the default GUI toolkit of python, simple but fair enough for our use). When the python code is fine, we package it as a standalone executable using the pyinstaller library.
Lately, we decided to use a build server to compile all our software when we commit new stuff on our CVS. Once again, we choosed a python based solution, the excellent buildbot. We managed to create a script that automates not only the build, but also all the packaging. Once our build is ready, we automatically upload it on our amazon S3 bucket thanks to the very powerful amazon S3 python API.
As you see, python is almost everywhere in our process, it is our glue and we use it every time we can automate a task.
Python is cross-platform, this way we make sure that everything we script will be reusable, whatever our developpers will use as coding environment.
Python rocks, I love my Python.