Sunday, April 20, 2008

TermEmulator 1.0 Released!!!

TermEmulator is a pure python module for emulating V100 terminal programs. It supports most of the important V100 escape sequences(e.g. cursor movement). Initially I started writing the emulator for a serial port communication program and later thought of releasing it as a separate module. You can get the module here.

The module comes with a demo application which is written in wxWidgets. The demo emulates any terminal program inside a text box. The following are the screenshots of emulating bash, emacs and vi using TermEmulator and the demo. successfully emulated(ran in a text box) bash, emacs, vi and some other terminal programs.

Some of the features of TermEmulator:
* Provides callback for updating terminal screen
* Supports graphics rendition(text style, foreground and background color)
* Allows resizing terminal window dynamically
* Direct access to raw screen buffer



Sunday, March 02, 2008

apt-get: Installing specific version of a package

Today I was struggling to install libxml2-dev. The problem is libxml2-dev depends libxml2 version 2.6.30.dfsg-2ubuntu1. But in my machine I already have libxml2 with version 2.6.30.dfsg-2ubuntu1.1. I really don't know how I got this version of of libxml2(I use multiple local repositories). Synaptic doesn't accept this version of libxml2 so I can't neither install libxml2-dev nor remove my version of libxml2 since lot of other packages depends on this.

Finally I found a solution that I can replace installed version of a particular package with another version.

apt-get install libxml2=2.6.30.dfsg-2ubuntu1


Note the equal(=) sign, thats where the magic is. It replaced the existing version of libxml2 with the version I specified. After that I installed libxml2-dev successfully.