PowerTab: Installation

Auto-completion by pressing the Tab key is built into PowerShell. In PowerShell jargon, this is called tab expansion. Everything, including commands, command history, paths, .Net object methods and properties can be queried and completed using tab expansion. With each press of the Tab key the next possible auto-completion alternative is displayed in-place at the prompt.

PowerTab is a must-have module for PowerShell if you love its tab expansion. PowerTab takes the tab expansion a notch higher by displaying a drop-down menu of the possible options when the Tab key is pressed. Use Tab or Up/Down keys to cycle through the options and press Enter to pick the option. Sweet! :-D

Installation

  1. The execution policy of PowerShell needs to be changed to allow execution of unsigned scripts. To find out how to do this, go here.
  2. If you have not already done so, create a default profile script for your username. To find out how, go here.
  3. Open PowerShell and find out the paths where it looks for modules. This can be done by typing $env:PSModulePath. The typical directory for modules is C:\Users\AverageJoe\Documents\WindowsPowerShell\Modules You may have to create this directory if it does not exist.
  4. PowerTab can be downloaded from here. It comes in the form of a ZIP file. Unzip it and a PowerTab directory is created.
  5. Place the unzipped PowerTab directory into the above Modules directory.
  6. In PowerShell, type Import-Module PowerTab to install the module. It will take you through a textual wizard, pressing Enter is enough for most of the questions it asks.
  7. During the wizard, the PowerTab installation will spew out a PowerTab initialization code. Paste this initialization code into your profile script. This enables PowerTab to be imported whenever PowerShell is started.

That is it! PowerTab should be available on all your PowerShell journeys. Bon voyage! :-D

Tried with: PowerTab 0.99.6 and PowerShell 2.0

Python: Installing modules on Windows

In my short experience with Python, I have found that there is more than one way to install a Python module on Windows and depending on the module you may need to know all the different tricks:

  1. Popular modules provide a .exe or .msi setup file. Just double click and it will find out your Python installation location and install its files in all the right locations.
  2. Most modules however ship as zipped up Python code. Unzip it, and if you see a setup.py file there, you can install it from the Windows command line using the incantation: python setup.py install
  3. Sometimes a module is just a single or few .py files. In this case put these files in your $(PYTHONPATH)/Lib directory and your Python code will be able to find them when you import the module.