This page features information and references regarding how to use write programs on Seattle. Seattle nodes run code written in a special language called Repy. Repy is a subset of the Python language (version 2.5 / version 2.6) invented specifically for Seattle.
Make sure you have all the necessary tools installed:
-
Step 1: Python2.5 or Python2.6 must be installed in order to use Repy. Download Python2.6 WINDOWS USERS: For instructions on how to check if you already have the correct version of Python installed, and for directions on how to install Python2.6, [wiki:InstallPythonOnWindows click here]
-
Step 2: You will have to download and install repy before starting the tutorials below: Download repy!
You can start with several different tutorials depending on your background.
-
PythonTutorial All of the Python You Need to Understand Repy (and None You Don't) Start here if you're new to Python and Repy!
-
PythonVsRepy All of the Python You Need to Forget to Use Repy Use this tutorial if you already know Python.
After doing one of the above tutorials, do the following tutorial to learn how to use Repy specific features and functionality:
- RepyTutorial Repy Tutorial Try this tutorial to learn more about Repy features and the language API.
- RePyV2 Tutorial
If you would prefer to use Repy V2, it is worthwhile to read through the following tutorials:
- RepyV2CheckoutAndUnitTests Checking out Repy V2 and Running the included unit tests
- RepyV2SecurityLayers How to use Security Layers with Repy V2
-
An easy way to start learning Seattle is to watch our UnderstandingSeattle/DemoVideo five-minute demo.
-
Use the RepyApi Repy API Reference as a quick guide to Repy's API once you are comfortable with the language.
-
Programmers writing code for Repy V2 may want to read about the RepyV1vsRepyV2 differences between Repy V1 and Repy V2.
-
There is a growing list of library code you can download and use with Repy (see seattlelib in the Seattle repository for examples). Read more about RepyHelper for the details of how to include Repy code in Python programs.
-
Documentation about the Seattle Standard Library can be seen at SeattleLib
- Continuous Integration Guide for Seattle Projects: ContinuousIntegrationGuide
João Moreno has also provided a VIM syntax file for Repy that will syntax color Repy programs.
You can also choose to automatically color Repy code with python-mode in emacs. In your .emacs file, add the following line:
(add-to-list 'auto-mode-alist '("
.repy$" . python-mode))
In order to have proper syntax highlighting for Repy, repy.lang
needs to be moved into the folder that stores the defined languages. It is a slightly modified version of the python language spec.
- For system-wide changes, move it to:
/usr/share/gtksourceview-3.0/language-specs/repy.lang
- For a single user, move it to:
~/.local/share/gtksourceview-3.0/language-specs/repy.lang
You can download repy.lang
[raw-attachment:repy.lang here]