Skip to main content

The graphics framework used by CMU CS Academy, geared toward beginner CS students.

Project description

Desktop CMU Graphics logo

Desktop CMU Graphics is an offline version of CMU Graphics, a persistent-object graphics package geared towards beginner computer science students. CMU Graphics and its desktop version are maintained by CMU CS Academy, a free-to-use middle and high school computer science curriculum developed by Carnegie Mellon University.

Desktop CMU Graphics works with Python 3.6-3.10 and is compatible with Replit (see "Replit" section below). This package, including its documentation, is licensed under the BSD 3-Clause license.

Installation

Choose zip or pip

There are two different ways to install Desktop CMU Graphics on a device:

  1. (Mac and Windows only) Use the zip file installer that is available for download on the CMU CS Academy website.
  2. (Mac, Windows, and Linux) Use pip, Python’s built-in package-managing software.

Both methods come with their own advantages and limitations. If you're in doubt about which to choose, the zip file installer is the most likely to succeed. It should work regardless of most restrictions in place on school-distributed devices.

For those using devices with Linux operating systems, or for those who are familiar with the command line/terminal, the pip version of the package offers a larger degree of versatility.

The remainder of these installation instructions are only for the pip version.

Install dependencies

If you're using Windows, you don't need to install any dependencies. Skip ahead to "Install CMU Graphics" below.

If you're using a Mac, install Homebrew.

If you're using a Mac or Linux, install the software packages needed by pycairo. Read their getting started page for instructions.

Install CMU Graphics

Run the following command:

pip install cmu-graphics

Getting Started

To run our graphics framework, include the following line at the top of your Python file:

from cmu_graphics import *

At the end of your Python file, add this line:

cmu_graphics.loop()

From there, the syntax for using the graphics package is identical to the online version of the framework. You can find more details about how to use the graphics framework here on our documentation page.

Teacher Support and Documentation

If you are a teacher with a CMU CS Academy Account and you have questions about CMU Graphics, remember that you can reach out to us through the Support tab on the left side of the CMU CS Academy website:

Highlighted teacher support tab

If you are an educator but do not have an account with CMU CS Academy, you can register for an account here.

If you are a student, or you are exploring Desktop CMU Graphics, there are plenty of resources to help you get started with the framework. Students can reach out to their teachers for questions about CMU Graphics, and a full reference documentation for the graphics framework is available on our documentation page.

Replit

Desktop CMU Graphics is compatible with Replit. To use the package on the Replit website:

  1. Create a new repl. Choose "Pygame" as the language.
  2. Click on the cube menu icon "Packages".
  3. Type "cmu-graphics" into the search bar, click on the package, and then click "Add".
  4. Run your code!

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cmu-graphics-1.1.8.tar.gz (61.8 kB view details)

Uploaded Source

Built Distribution

cmu_graphics-1.1.8-py3-none-any.whl (65.1 kB view details)

Uploaded Python 3

File details

Details for the file cmu-graphics-1.1.8.tar.gz.

File metadata

  • Download URL: cmu-graphics-1.1.8.tar.gz
  • Upload date:
  • Size: 61.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.5.0 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.5

File hashes

Hashes for cmu-graphics-1.1.8.tar.gz
Algorithm Hash digest
SHA256 1fda20a0b6dba1c3553c5946d0bdf02c1107722e43d7925aa06649fe43567927
MD5 f26e37be3bbe798e9b6b42e453b5d98e
BLAKE2b-256 7bc831da9b8d1804660c7aaed29a2f47d278c5fea5431e60e953c5cfc79ca7b2

See more details on using hashes here.

File details

Details for the file cmu_graphics-1.1.8-py3-none-any.whl.

File metadata

  • Download URL: cmu_graphics-1.1.8-py3-none-any.whl
  • Upload date:
  • Size: 65.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.5.0 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.5

File hashes

Hashes for cmu_graphics-1.1.8-py3-none-any.whl
Algorithm Hash digest
SHA256 2e31fc64926d86c65d88ba058bad974792b92aafd871cde5cadbd20a8a081e7d
MD5 371090a665fd825cc80444dee23361d8
BLAKE2b-256 b7b80639f4091d10eb0c519995b5e9879783c73e895c230b4b7c10fe3898acbb

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page