enable.py

It has long bothered me that the only installation options for NatLink—a Python voice interface system—have been one of

  • editing the registry and configuration file settings by hand
  • casting vain hopes upon a rickety C++ GUI
  • using the enormous .NET installer with all of its (for me unwanted) extras

After grumbling about it to my long-suffering wife and scratching my head in perplexity for a while, I finally realized that no one else was going to write a Python script to enable NatLink, so if I wanted one I'd better get to the business of writing it.

enable.py is a commandline Python script to enable/disable the NatLink Python extension to Dragon NaturallySpeaking. The script automates the process of adding/removing the appropriate NatLink config entries in the Windows registry and NaturallySpeaking configuration files. Note that it is not an installer, so it will not create entries in the Control Panel's Add/Remove Programs applet nor will it unpack anything for you; think of it more as a much needed replacement for EnableNL. That said, the installation process is fairly straightforward...

Updates

September 29, 2008: I've made two significant updates to the enable script:

  1. Jonathan Epstein uncovered a bug in the Python version selection code that caused the script to fail if more than one version of Python was installed.

  2. The method used to update the Python path has changed. The original EnableNL program and the first version of this script used the Windows registry to set the path. Instead, the updated enable script takes advantage of Python's site module by adding path information to a text file in the site-packages directory. This approach should be easier to maintain and seems more, well, "Pythonic" than using the registry. Thanks to Speech Computing/Voice Code list user Reckoner for leading me to this simpler solution.

    The script's previous behavior has been preserved and can be accessed using the commandline options /ir and /ur ("install registry" and "uninstall registry").