GCBASIC Blockly Project Guide
Introduction
This guide provides a straightforward, local installation of GCBASIC for Blockly, allowing you to run it seamlessly on your system. By using Python’s built-in http.server
, you can create a lightweight web server to host Blockly files without any complex setup.
The process is simple:
- Install Python.
- Copy Blockly files to a directory.
- Start a local web server with a single command.
Follow this guide to quickly set up your GCBASIC_Blockly.html
project and begin experimenting with Blockly in a controlled environment.
Table of Contents
What is Python's http.server
?
Python's http.server
is a built-in module that allows you to create a simple HTTP server to serve files from a directory.
- Purpose: Ideal for testing, development, and quick file sharing.
- Limitations: Not recommended for production use due to lack of security features, performance optimization, or scalability.
Why Use a Simple HTTP Server in Python?
- Easy File Sharing – Share your Blockly workspace with others on the same network.
- Quick Testing – Test your Blockly application locally.
- Development Convenience – Serve files for real-time debugging.
- Cross-Platform – Works on Windows, macOS, and Linux.
How to Start a Server (Install)
- Install Python:
- Download and install Python from the official site Python.org.
- Ensure Python 3.x is installed (
python --version
).
- Copy Files to a Folder:
- Create a dedicated directory (e.g.,
BlocklyProject
).
- Copy your Blockly project files into this folder.
- Open a Command Prompt:
cd path/to/BlocklyProject
(Windows, macOS, Linux)
How to Start a Server (One-liner)
python -m http.server 8000
How to Access the Server (One-liner)
http://localhost:8000/GCBASIC_Blockly.html
Best Place to Download Python
The best place to download Python is the official Python website: Python.org.
Alternatively, for Windows users: Python via Microsoft Store.