Please note that these Trac pages are no longer being updated. Wiki contents/documentation have moved to GitHub.

Programmer Portal

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.

Before You Begin

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, click here
  • Step 2: You will have to download and install repy before starting the tutorials below:  Download repy!

Tutorials

You can start with several different tutorials depending on your background.

After doing one of the above tutorials, do the following tutorial to learn how to use Repy specific features and functionality:

  • Repy Tutorial. Try this tutorial to learn more about Repy features and the language API.

If you would prefer to use Repy V2, it is worthwhile to read through the following tutorials:

Other Resources

  • Use the Repy API Reference as a quick guide to Repy's API once you are comfortable with the language.
  • 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

Editing Repy files

Vim

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))

gedit

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 here

Attachments