Posts Tagged ‘solution’

Patch for hg.setuptools to play nice in a virtualenv

Monday, January 7th, 2008

I am using Mercurial to manage the source for some of my newer projects, and hg.setuptools caught my attention as something that would be very useful. I'm used to having the same functionality using Subversion, that is to say, I'm used to setuptools figuring out what files it should include with a distribution based on whether or not they're in the repository.

I use virtualenv to manage my development environments, and I found that when using hg.setuptools 0.2 out of the box, I'd get errors such as the following:

  File "/var/lib/python-support/python2.5/mercurial/demandimport.py", line 70, in __call__
    raise TypeError("'unloaded module' object is not callable")
TypeError: 'unloaded module' object is not callable

I ran across a note that mentioned disabling demandimport, so that is what I did with hg.setuptools. I uploaded a patch that made it work for me. If you're having the same problem, I hope it works for you too!

Ubuntu, Athlon 64, and erratic keyboard repeats

Wednesday, January 2nd, 2008

Symptoms:

  • Strange, intermittent, erratic, and persistent key repeating

Setting:

Potential cause:

  • Differences between how Intel and AMD chips handle timing, exacerbated by the use of the i386 flavor of the kernel included with Ubuntu.

Solution:

  • Install the generic flavor of the kernel: * sudo aptitude install linux-generic
  • Make that kernel the default option: * Edit the /boot/grub/menu.lst file as root. * Counting from zero, find the generic kernel from the list at the bottom of the file. * Change the default option at the top of the file to the number of that kernel. * Save and close the file.
  • Reboot.