Skip to content

Latest commit

 

History

History
279 lines (204 loc) · 6.84 KB

File metadata and controls

279 lines (204 loc) · 6.84 KB

Offline Setup Guide

For classrooms with limited or no internet access.

Quick Summary

Weeks 1-12: Work completely offline (no internet needed after Thonny install)
⚠️ Weeks 13-18: Need one-time internet for Pygame Zero install
⚠️ Weeks 19-24: Need internet for micro:bit software OR use offline alternatives


Complete Offline Preparation

Before Going to Classroom (With Internet):

1. Download Thonny IDE

  • Visit: https://thonny.org/
  • Download appropriate version:
    • Windows: thonny-4.x.x.exe (includes Python)
    • macOS: thonny-4.x.x.pkg
    • Linux: thonny-4.x.x-x86_64.tar.gz
  • Save installer to USB drive

2. Download PythonQuest Curriculum

# Option A: Download as ZIP from GitHub
# Go to: https://github.com/devatsecure/PythonQuest
# Click "Code" → "Download ZIP"
# Extract to USB drive

# Option B: Clone with git (if you have it)
git clone https://github.com/devatsecure/PythonQuest.git
# Copy folder to USB drive

3. Download Pygame Zero (for Weeks 13-18)

# Download wheel file
pip download pgzero --dest pygame_wheels

# This creates: pygame_wheels/pgzero-1.x.x-py3-none-any.whl
# Copy entire pygame_wheels folder to USB drive

4. Download Mu Editor (for Weeks 19-24)


Classroom Installation (No Internet)

Step 1: Install Thonny (5 minutes per computer)

Windows:

# From USB drive
thonny-4.x.x.exe
# Follow installer prompts

macOS:

# From USB drive
sudo installer -pkg thonny-4.x.x.pkg -target /

Linux:

# Extract and run
tar -xzf thonny-4.x.x-x86_64.tar.gz
cd thonny
./thonny

Step 2: Copy Curriculum Files

Copy entire PythonQuest folder to:

  • Windows: C:\Users\[Username]\Documents\PythonQuest
  • macOS: /Users/[Username]/Documents/PythonQuest
  • Linux: /home/[Username]/Documents/PythonQuest

Or: Each student can work directly from USB drive (slower but works)

Step 3: Install Pygame Zero Offline (Before Week 13)

From Thonny:

  1. Tools → Open System Shell
  2. Navigate to USB drive with pygame_wheels folder
  3. Run: pip install --no-index --find-links=pygame_wheels pgzero

Or from command line:

pip install --no-index --find-links=/path/to/pygame_wheels pgzero

Step 4: Install Mu Editor (Before Week 19)

Same as Thonny - run installer from USB drive.


Teaching Offline (Per Phase)

Weeks 1-6: Python Foundations ✅ Fully Offline

No internet needed at any point!

  1. Open Thonny
  2. Navigate to week folder
  3. Open .py file
  4. Press F5 to run

Everything works without internet.

Weeks 7-12: Turtle Graphics ✅ Fully Offline

No internet needed!

Turtle is built into Python standard library - works offline.

Weeks 13-18: Pygame Zero ⚠️ One-Time Setup

After initial Pygame Zero install, fully offline

  • Install Pygame Zero once (see Step 3 above)
  • All weeks then work offline
  • Students can create and run games without internet

Weeks 19-24: micro:bit ⚠️ Options

Option A: Mu Editor (Best)

  • Install Mu Editor offline (Step 4 above)
  • Connect micro:bit via USB
  • Write code and flash - works offline!

Option B: Manual .hex File Transfer

  • Write code in Thonny (offline)
  • Manually create .hex file (requires Python microbit module)
  • Copy to micro:bit USB drive

Option C: Online Editor (Requires Internet)

Option D: Simulator Only (No Hardware)

  • Use online simulator (one computer with internet)
  • Project on screen for class demonstration
  • Students code in Thonny (offline)

Offline Troubleshooting

"Package pgzero not found"

Cause: Pygame Zero not installed
Fix: Follow Step 3 above with pygame_wheels folder

"micro:bit not detected"

Cause: USB cable or driver issue
Fix:

  • Try different USB cable (some are charge-only)
  • Install driver from USB drive (prepare beforehand)

"Can't access online editor"

Cause: No internet
Fix: Use Mu Editor (offline) or simulator-only approach


Creating Complete Offline USB Kit

Folder structure for classroom USB:

USB Drive/
├── PythonQuest_Offline_Kit/
│   ├── 1_Installers/
│   │   ├── thonny-windows.exe
│   │   ├── thonny-mac.pkg
│   │   ├── thonny-linux.tar.gz
│   │   ├── mu-editor-windows.exe
│   │   └── mu-editor-mac.dmg
│   ├── 2_Curriculum/
│   │   └── PythonQuest/ (complete repo)
│   ├── 3_Dependencies/
│   │   └── pygame_wheels/
│   │       └── pgzero-1.x.x-py3-none-any.whl
│   ├── 4_Drivers/
│   │   └── microbit-driver-windows.exe (if needed)
│   └── SETUP_INSTRUCTIONS.txt

SETUP_INSTRUCTIONS.txt:

PYTHONQUEST OFFLINE SETUP
=========================

1. Install Thonny from 1_Installers folder
2. Copy 2_Curriculum/PythonQuest to Documents
3. Open Thonny → Open week01/week01_story_printer.py
4. Press F5 - should work!

For Weeks 13-18:
- Run from Thonny shell: pip install --no-index --find-links=3_Dependencies/pygame_wheels pgzero

For Weeks 19-24:
- Install Mu Editor from 1_Installers
- OR use online editor with internet

Questions? See docs/TROUBLESHOOTING.md

Bandwidth Considerations

Total Download Size:

  • Thonny installer: ~20-50 MB (includes Python)
  • PythonQuest curriculum: ~5 MB
  • Pygame Zero wheel: ~500 KB
  • Mu Editor: ~150-200 MB
  • Total: ~200-300 MB

Can fit on:

  • ✅ USB drive (any size)
  • ✅ CD/DVD
  • ✅ School network shared folder
  • ✅ Download once, distribute to all computers

Pre-configured Computer Labs

For schools with managed computer labs:

  1. IT admin installs Thonny + Pygame Zero + Mu on all computers (once)
  2. Copy PythonQuest to shared network drive
  3. Students access from network (no USB needed)
  4. Everything works offline semester-long

Setup time: 30 min for 30 computers (with remote deployment)


Emergency Fallback (No Install Permissions)

If you cannot install ANY software:

Use Portable Python

  • Download portable Python + Thonny (runs from USB, no install)
  • Available from: https://winpython.github.io/ (Windows)
  • Or use online editors (requires internet):
    • Replit.com
    • Trinket.io
    • Google Colab

Testing Your Offline Setup

Before going to classroom:

  1. Disconnect from internet
  2. Test Weeks 1-6: Should work perfectly
  3. Test Weeks 7-12: Turtle should work
  4. Test Week 13: Pygame Zero should work (if installed offline)
  5. Test Week 19: Mu Editor should open

If all work → Setup is successful! ✅


Questions?