Skip to content

jdherg/pyet

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 

Pyet

====

Pyet is a toy interpreter for a restricted subset of the language Piet written in Python.

Pyet is also a testbed for me to learn and apply Python best practices, and as a result its structure may shift substantially from commit to commit.

Usage

The main Pyet script doesn't directly read image files, instead reading in a custom text representation of a Piet image. You can convert your Piet image file to a Pyet text representation using image_to_source.py as follows:

python3 image_to_source.py source.[jpg|png|gif] > source.pyet

Once you have your Pyet program, you can interpret it:

python3 pyet.py source.pyet

For more options, use the -h flag:

python pyet.py -h
Usage: python pyet.py [options] source_file

Options:
  -h, --help   show this help message and exit
  -d, --debug  print debugging information

Restrictions

Pyet does not yet support:

  • The "in" commands (char or int).
  • Specifying a codel size. Codels are 1 pixel.

Requirements

  • Python 3.X
  • Pillow if you'd like to run image_to_source.py to convert an image to a Pyet source file

About

A toy Piet interpreter in Python

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages