There are three steps: downloading the source code, installing Python, and using Python to execute the code.
Downloading OSPC-ACA Source Code
Click on the hyperlink just to the left of Leaf at the top of the
trunk branch in the Timeline. Then click on either Tarball or
ZIP archive on the Downloads line of the Overview, depending
on whether you want a .tar.gz or a .zip archive of all
the project files. The downloaded archive file will be named either
where <version> is a ten-digit hexadecimal number that is an abbreviation of the full identifier of the Leaf check-in you selected for downloading.
We strongly recommend that you expand the archive file in your home directory. Move the archive file into your home directory where a new subdirectory called OSPC-ACA-<version> will contain all the project files. Then expand the archive file using the appropriate tool (for example, the unzip tool if you downloaded a ZIP archive file).
At this stage, you can read the source code using any text editor.
Installing Anaconda Python Distribution
If you want to execute the scripts, you will need to install on your computer the free Anaconda Python distribution --- either the 2.7 version or the 3.4 version --- available from Continuum Analytics at this link. This installation will not interfere with any other Python installation on your computer and does not require administrative privileges.
To check that the Python installation is working as expected, change directory to OSPC-ACA-<version> and at the operating-system command prompt (typically either $ or >) in that directory, enter the following command (that is, the text to the right of the operating-system prompt):
OSPC-ACA-<version>$ python --version
Your should see something like the following if you installed Python 2.7:
Python 2.7.10 :: Anaconda 2.2.0 (x86_64)
or like the following if you installed Python 3.4:
Python 3.4.3 :: Anaconda 2.2.0 (x86_64)
And finally, you need to install one Python package that is required for the OSPC-ACA project that is not part of the Anaconda distribution. Do that by entering the following command from the OSPC-ACA-<version> directory:
OSPC-ACA-<version>$ python install_pylint.py
Then create an empty pylint configuration file so as to silence annoying messages about not having one. If you are working on a Mac or under Linux, execute the first version of the following command; if you are working on a Windows computer, execute the second verson of the following command:
OSPC-ACA-<version>$ touch ~/.pylintrc
OSPC-ACA-<version>$ type NUL > ..\.pylintrc
If you elect to read the Contributor Documents later, you will learn about how the pylint source-code checker is used in the OSPC-ACA project. But, at this point, there is no reason to learn more.
Using Python to Execute Source Code
To check that everything is working as expected, change directory to OSPC-ACA-<version> and at the operating-system command prompt in that directory, enter the following command:
OSPC-ACA-<version>$ python tests.py
If Python is correctly installed and the project files have been downloaded successfully, the tests.py script should execute in less than a minute without writing any output to the screen. If you have a problem, please use this link to create a new ticket that describes your problem.
If you pass the tests, begin exploring the ptc.py script by entering the following commands for information:
OSPC-ACA-<version>$ python ptc.py --help
OSPC-ACA-<version>$ python ptc.py --sample_format
OSPC-ACA-<version>$ python ptc.py --output_format
and by entering the following command to see the script in action:
OSPC-ACA-<version>$ python ptc.py
Next read about how to create your own sample files.