Skip to main content

Scratch-like Python programming

Project description

PyStage

Documentation Status

Scratch-like Python programming.

PyStage bridges the gap between Scratch and Python. This module implements all code blocks as available in scratch. With the PyStage command line converter Scratch projects can be easily transferred to Python executable Code. To run your game in Python, PyStage uses PyGame.

test

Goals

  • Export your Scratch project to real executable Python code!
  • Helping coding beginners to learn Python "by Scratch".
  • Implementation of scratch blocks in several languages (ideal for kids). As of now en and de.

Installation

pip install pystage


NOTE

Please note this is a pre alpha version. Not all things may work as expected. If so, please contact us or open an issue. Also, not all blocks are documented in a suitable manner.


Usage

Converting a Scratch project to Python code:

  1. Export your Scratch project on the Scratch page. You will get an .sb3 file.
  2. Use the PyStage converter script (src/pystage/sb3.py). Yes, it's unhandy, we will work on it to make things easier.

The base usage is python -m pystage.convert.sb3 <SB3 File> -l en -d <DIRECTORY> The parameters are:

  • -l language of generated python "scratch blocks". In the moment of writing, en and de are available.
  • -d the output directory, defaults to current directory
  • -i print intermediate code representation
  • -s print sb3 project.json
  • -p print python code
  • -v verbose
  • -vv debug mode

Contributors

Special thanks to

  • Kai Eckert
  • Florian Rupp

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

pystage-0.0.9.tar.gz (543.3 kB view details)

Uploaded Source

Built Distribution

pystage-0.0.9-py3-none-any.whl (548.7 kB view details)

Uploaded Python 3

File details

Details for the file pystage-0.0.9.tar.gz.

File metadata

  • Download URL: pystage-0.0.9.tar.gz
  • Upload date:
  • Size: 543.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.0 requests-toolbelt/0.9.1 tqdm/4.52.0 CPython/3.8.2

File hashes

Hashes for pystage-0.0.9.tar.gz
Algorithm Hash digest
SHA256 8592b9660213e0c02b534a9f679f906bf9be53138dfb0a188cbbb8b8e48c63fa
MD5 561484b3041a003c03c662439c422e98
BLAKE2b-256 1be47442a944d05cf4c00bbfac2cf9eb5c99addcfc30caf5472d9b2e9075e46f

See more details on using hashes here.

File details

Details for the file pystage-0.0.9-py3-none-any.whl.

File metadata

  • Download URL: pystage-0.0.9-py3-none-any.whl
  • Upload date:
  • Size: 548.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.0 requests-toolbelt/0.9.1 tqdm/4.52.0 CPython/3.8.2

File hashes

Hashes for pystage-0.0.9-py3-none-any.whl
Algorithm Hash digest
SHA256 744fb9a83eed72b88826c3230dd237077aa31b9e065e68bdcdc4e0a1aa64e9d5
MD5 49b13cd17fd85791cfffee7207dc666d
BLAKE2b-256 392391072c290dd3507e2b80f62e014727299d041f533529b75ad7cbffcdb7b7

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