Currently I’m working on a small utility that converts gams data files (.gdx) into open office spreadsheets. It’s meant to be a replacement of the gdx2xls utility that moves data from a .gdx file to an Excel spreadsheet, but only available on Windows machines (and MS Office must be installed).
The core of the software is a few hundred lines long python code that reads the gdx file content and write it into an open office spreadsheet. (Communication between python and open office is based on the ooolib library – thanks Joseph Colton for releasing it under the GNU Lesser GLP license).
For developing such a relatively small project you can simply use gnome’s built-in text editor – gedit. By default, only syntax highlighting is available in gedit. But, by installing some additional plugins, gedit can be turned into a fully functional IDE. Check out the screencast below:
The plugins you can see in action above are: Class Browser, Embedded Terminal, iPython Console, Python Code Completion, Python Indentation, External Tools and Bracket Completion
Basically, gedit plugins can be
- shipped with the base package
- included in the gedit-plugins package (sudo apt-get install gedit-plugins if it’s not already installed)
- third-party plugins created by the community (install third-party plugins by downloading them from here and by extracting them into the ~/.gnome2/gedit/plugins folder).
Debugging. For a console based solution choose pdb. To use pdb in interactive mode start pdb from the embedded terminal (just as seen in the screencast) by typing:
python -m pdb your_python_script.py
If you prefer a gui for debugging choose winpdb. There is no debugger plugin for gedit yet, but winpdb can be used parallel with gedit. Start winpdb as a standalone application and load the python script you’re working on.