Thursday, July 26, 2012

Showing whitespace in Eclipse

I use these settings to highlight undesirable whitespace in my code. By undesirable I mean tabs (when I use spaces for indentation) and any trailing whitespace.

  1. Open Preferences.
  2. Go to General > Editors > Text Editors.
  3. Check the Show whitespace characters checkbox.
  4. Click the whitespace characters link.
  5. Use the following settings.
  6. Click OK to save the whitespace settings.
  7. Click OK to save the preferences.

Wednesday, July 4, 2012

Stopping Windows' console beep

Since installing Gow I've been able to once again enjoy bash's tab completion. Unfortunately bash likes to beep whenever there's a completion choice to be made…

Console beeping can be disabled by turning off the Windows beep service with:

net beep stop

Via Stack Overflow.

Monday, July 2, 2012

Python setuptools bootstrap errors

I ran into some errors installing py-dom-path 0.1 into my Win32 Python 2.7 installation. Here are the errors and their resolution.

The installation command I used was:

C:\...\python.exe C:\...\py-dom-xpath-0.1\ install


First, running in a corporate environment, the bootstrap script failed to access the network to download setuptools.

I needed to set an environment variable with the HTTP proxy details.

set HTTP_PROXY=user:pass@host:port

Old version of bootstrap script

The bootstrap script included in py-dom-path 0.1 is out of date. It referenced an old version of setuptools that was no longer available:

urllib2.HTTPError: HTTP Error 404: Not Found

I downloaded the latest version of the bootstrap script, placed it in the source directory and ran the installation again, this time with no problems.