CPO Guide

Getting used to the Pyret Editor can be a bit tricky. Let us help you navigate your way through it!

Getting Started

Connecting to Google Drive

Pyret is nice, in that, it allows you to connect it to your brown.edu Google Drive. This will allow you to save your files directly to Drive!

When you go to code.pyret.org, there is an option to ‘Sign in’ – click on that and log into your Brown email.

If you are already in the Pyret Editor and want to connect it to Drive, click on the ‘Connect to Google Drive’ tab on the toolbar (top-left corner).

Once your program / file is connected to your account, you will be able to find your files in a Drive folder called code.pyret.org.

Renaming and Downloading Pyret Files

Once you’re signed in on Pyret, your toolbar will look like this:

Click on File > Rename to rename your .arr file. (Your file must be saved in order to rename it.)

To download your .arr file to your machine, click File > Download. This will save your file to your default download directory on your computer (it’s probably a folder called Downloads).

Save Your Work!

Pyret sometimes auto-saves. DO NOT RELY ON THIS. Make sure you frequently save your work! You can click File > Save or use the keyboard shortcut Ctrl+s.

Definitions and Interactions Windows

There are four main features in the CPO:

  1. The left window:
include image

circle(50, "solid", "red")
x = 9 + 5
hi = rectangle(100, 100, "solid", "black")
hi
  1. The Run button:

For example, if you press “Run” on the program that is defined in part 1, the right window will display this:

And when you type x in the new line in the right window, and press enter, it will print what is returned by x - this means that the Interactions window knows of everything that was defined in the Defitions window! More about the Interactions window in the section below.

  1. The right window:
  1. The Stop button:

Editing your README.txt

Every single one of your assignments should come equipped with a README.txt file, where you document your code. This will document your program(s) for yourself and for your code reviewers.

We certainly grant some creative liberty with your README, but be sure that it’s formatted correctly and include these essential parts:

DO NOT INCLUDE YOUR NAME!! Your README should remain anonymous!

Miscellaneous

Keyboard Shortcuts in the CPO

Design and Clarity and Stuff

Check out our Pyret Style and Design and Testing Guide!!


Made with love by CSCI 0111 Staff - Fall 2019 <3