Instruction manual

Appendices
Introduction:
For convenience, included in the “python.zip” file that can be downloaded from
www.bkprecision.com are Python 2.5.2, pyserial 2.4, and pywin32 2.12. These are the 3 executable
files required to use the python library and the COM server. If user decides to install using the
provided files, please skip Step 1 in Appendix 1, Appendix 2, and Appendix 3. If user rather
download the executable files themselves to obtain the latest versions, please follow all the steps as
indicated in all three appendices in the following.
Appendix 1: Getting and Installing Python
Step 1:
Go to http://www.python.org and get the current production version of python. The installer is a
Windows executable -- all you need to do is run it. You can accept the default choices if you wish.
Step 2:
Once python is installed, you need to add the python installation directory to your Path environment
variable. On Windows XP, this is done by going to My Computer and right clicking to choose
Properties. Click on the Advanced tab and then click the Environmental Variables button. The
method for other versions of Windows can be different.
Step 3:
Open a DOS window (one way is to click on the Start button, select Run, then type in cmd.exe).
Type python and press the Enter key. You should see something like the following:
Python 2.5.1 (r251:54863, Apr 18 2007, 08:51:08) [MSC v.1310 32 bit (Intel)] on
win32
Type "help", "copyright", "credits" or "license" for more information.
>>>
If you see this, python is installed correctly. This is known as the python interactive interpreter.
Press ctrl-z and return to exit the python interpreter.
Appendix 2: Getting and Installing pyserial
Step 1:
Go to http://pyserial.sourceforge.net and download the pyserial package.
Step 2:
Unpack it in a convenient directory, then open a DOS window and cd to that directory. Type the
command
python setup.py install
Step 3:
This will install pyserial. You can verify the installation by starting python, then typing import
serial as follows:
Python 2.5.1 (r251:54863, Apr 18 2007, 08:51:08) [MSC v.1310 32 bit (Intel)] on
win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import serial
>>>
B&K 1785, 1786B, 1787B, 1788 Python Library 15 January 2009 Page 13 of 14