{"id":13813093,"url":"https://github.com/bbcmicrobit/PythonEditor","last_synced_at":"2025-05-14T22:31:49.673Z","repository":{"id":2595079,"uuid":"46940872","full_name":"bbcmicrobit/PythonEditor","owner":"bbcmicrobit","description":"A MicroPython editor for the BBC micro:bit that works with browsers.","archived":false,"fork":false,"pushed_at":"2023-01-07T04:09:50.000Z","size":27428,"stargazers_count":198,"open_issues_count":60,"forks_count":129,"subscribers_count":23,"default_branch":"master","last_synced_at":"2025-04-06T14:13:00.516Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://python.microbit.org/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bbcmicrobit.png","metadata":{"files":{"readme":"README.rst","changelog":"CHANGELOG","contributing":"CONTRIBUTING.rst","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-11-26T18:04:19.000Z","updated_at":"2025-02-11T11:05:12.000Z","dependencies_parsed_at":"2023-01-11T16:11:10.445Z","dependency_job_id":null,"html_url":"https://github.com/bbcmicrobit/PythonEditor","commit_stats":null,"previous_names":[],"tags_count":26,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bbcmicrobit%2FPythonEditor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bbcmicrobit%2FPythonEditor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bbcmicrobit%2FPythonEditor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bbcmicrobit%2FPythonEditor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bbcmicrobit","download_url":"https://codeload.github.com/bbcmicrobit/PythonEditor/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254239714,"owners_count":22037758,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-04T04:01:02.827Z","updated_at":"2025-05-14T22:31:44.614Z","avatar_url":"https://github.com/bbcmicrobit.png","language":"JavaScript","funding_links":[],"categories":["HTML"],"sub_categories":[],"readme":"BBC micro:bit MicroPython Editor for Browsers\n=============================================\n\n|Build status|\n\nThis project is an editor that targets the `MicroPython\n\u003chttps://micropython.org\u003e`_ version of the `Python programming language\n\u003chttp://python.org/\u003e`_. Code written with this editor is expected to run on the\n`BBC micro:bit device \u003chttps://microbit.org\u003e`_.\n\nDeveloper Setup\n---------------\n\nThis editor works with any modern web browser.\n\nIn addition to cloning the repository it is required to retrieve the GIT\nsubmodules::\n\n    git clone https://github.com/bbcmicrobit/PythonEditor\n    cd PythonEditor\n    git submodule update --init --recursive\n\nAssuming you have Python 3 installed you can serve the editor like this::\n\n    $ ./bin/show\n    http://localhost:8000/editor.html\n    Serving HTTP on 0.0.0.0 port 8000 ...\n\nYou can also look at the script content and execute the same, or similar,\ncommand on a terminal as long as it serves the contents of this repository on\nport `8000`. `This article \u003chttps://gist.github.com/willurd/5720255\u003e`_ shows\nother ways to achieve the same.\n\nThen, point your browser to http://localhost:8000/editor.html.\n\nTests\n+++++\n\nThere are two ways to run tests:\n\n* A portion of the tests can be run in the browser\n\n  - Serve the editor and point your browser to\n    ``http://localhost:8000/tests.html``.\n\n* The full test suit can be run with Node.js\n\n  - ``cd tests \u0026\u0026 npm install \u0026\u0026 npm run test``\n\nTests are in the ``tests`` directory with their own README explaining how they\nwork.\n\nCode\n++++\n\n* ace - a directory containing the Ace editor (http://ace.c9.io).\n* bin - a directory containing useful scripts.\n* blockly - a GIT sub-module containing Google's blockly project.\n* docs - a directory containing more documentation for the editor.\n* js - a directory containing the JavaScript code for running the editor.\n* CHANGELOG - a record of how things have changed between versions.\n* CONTRIBUTING.rst - a guide for people who want to contribute (you should!).\n* editor.html - the page to be loaded by your browser.\n* help.html - a single page user facing help page.\n* lang - a directory containing the editor translations.\n* LICENSE - a copy of the MIT software license that covers this code.\n* microbit_blocks - a GIT sub-module containing custom MicroPython blocks.\n* micropython - a directory with the MicroPython hex files used by the editor.\n* python-main.js - the JavaScript code for running the editor.\n* README.rst - this file, the clue is in the name. ;-)\n* tests.html - the browser based test runner.\n* show.sh - a script that allows you to serve the editor from localhost.\n* static - contains third party css, js and img sub-directories.\n* tests - contains the Python specific test suite.\n* tests.html - point your browser at this file to run the tests.\n\nContributing\n++++++++++++\n\nWe love bug reports, contributions and help. Please read the CONTRIBUTING.rst\nfile for how we work as a community and our expectations for workflow, code and\nbehaviour.\n\nUsage\n-----\n\nThe Python editor is based upon the \"Ace\" JavaScript editor (http://ace.c9.io)\nand includes syntax highlighting, code folding and (semi) intelligent\nauto-indentation.\n\nAll new scripts default to something simple and sensible.\n\nThe default name for a new script is ``microbit``. The default code is a\nshort program to repeatedly display ``Hello, World!`` followed by a heart.\nYou can change these at any time by clicking on them.\n\nThe layout and functionality is deliberately simple. A description of the\nbuttons can be found in the [help page](help.html).\n\nIf you have a Python script or hex file on your local computer, you can load it\ninto the editor by dragging it onto the text area.\n\nThe micro:bit can then be programmed by downloading a hex file into your\ncomputer and then copying the file into the MICROBIT drive. If you are using\na Chrome-based browser you also have the option to connect via WebUSB and\nflash the micro:bit directly from the browser.\n\nConfiguration\n-------------\n\nTo launch the editor you'll need to pass in a ``config`` JavaScript object\ncontaining translation strings and feature flags. Take a look in the\n``editor.html`` file to see how this is done.\n\nDocumentation\n-------------\n\nMore documentation can be found in the `docs folder \u003cdocs\u003e`_.\n\nFor in-editor documentation aimed at the user, this is in the `help.html file\n\u003chelp.html\u003e`_.\n\nMetrics\n-------\n\nIn order to help developers measure the way features of the editor are being\nused, all buttons and actions have an 'action' class added to them. Measurement\ncan then be added by anyone deploying the editor through inclusion of a script\nthat attaches events to these actions and counts them.\n\nLegacy\n------\n\nThis project was born from a TouchDevelop based editor created by Nicholas\nH.Tollervey for the BBC. This is no longer maintained, although you can find it\nstill on the ``touch-develop-legacy`` branch in this repository.\n\n\n.. |Build status| image:: https://dev.azure.com/microbitPython/PythonEditor/_apis/build/status/bbcmicrobit.PythonEditor?branchName=master\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbbcmicrobit%2FPythonEditor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbbcmicrobit%2FPythonEditor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbbcmicrobit%2FPythonEditor/lists"}