Setting up

I am first going to describe what you have to do to get PiScript running on the BMS laboratory system, then say something about what it takes to get it running on your own computer.

One advantage to using the BMS machines is that updates will be automatically used as (horrors!) bugs are fixed.

In the BMS laboratory

You have to tell your computer where the PiScript package is. To do this, you must set the environment variable PYTHONPATH to include that directory.

Exactly how to do this depends on a few details. On the system at the BMS, the correct directory is /extern/homes/bms_g8/python/lib. It is a subdirectory of my own home directory that is is openly accessible. I have set things up this way so I can fix errors rapidly. Please call my attention to them as you see them.

Exactly what you do depends on which shell you are using. It could be tcsh or bash. It seems that in order to make thing work at the moment it should be bash. You can arrange this by typing bash in any terminal window you open.

Then, while in your home directory, edit (create if necessary) a file .bashrc to include these lines:


export PYTHONPATH=/extern/homes/bms_g8/python/lib

In order for this to take effect immediately, type source .bashrc in your terminal window. Hereafter whenever you run bash this will be done automatically.

This is all you need to do to get started. However, sooner or later you will probably want to adjust your TEX environment in PiScript. And you will want to do this as well:

cd
mkdir .piscript
cd .piscript
mkdir configs
cd configs
touch __init__.py
cd

and then change your .bashrc file so it contains these lines:

export PYTHONPATH=$HOME/.piscript:/extern/homes/bms_g8/lib/python
export LOCALPISCRIPTDIR=$HOME/.piscript

The point of this extra directory structure is to be able to store PiScript stuff that is not overwritten by updates and also freely accessible to you, such as your own TEX configuration files.

On your own Linux machine or Mac

Assuming that a PostScript viewer (such as gv), and Python are already installed on your computer:

Download the current package. Unpack it. Set PYTHONPATH to include the piscript subdirectory as above.

On Windows machines

Things don't work at the moment on Windows, but when it does you will open Control Panel/System/Advanced/Environment Variables. Set PYTHONPATH to be the directory containing the functional PiScript directory. You can find exactly where this is by searching for PiScript.py.

Also set an environment variable LOCALPISCRIPTDIR, and put this also in your PYTHONPATH. On my machine this is the `hidden' directory .piscript in my home directory. This directory should have in it a subdirectory configs. The configs directory should have in it an empty file __init__.py.