Skip to content

Repository files navigation

PythonBuddy 🖊️ 🐍

Travis
Online Python 2.7 Programming with Live Pylint Syntax Checking!

###Usage

  1. Fetch from repo:
git clone https://github.com/ethanchewy/PythonBuddy.git
  1. Change to directory
cd OnlinePythonLinterSyntaxChecker
  1. Create virtualenv based on your own system:
virtualenv -p /usr/bin/python2.7 venv
  1. Activate vitrual environment:
source venv/bin/activate
  1. Pipe requirements to venv folder:
pip install -r requirements.txt
  1. Set FLASK_APP variable:
export FLASK_APP = app.py
  1. Run flask app:
flask run

Open your browser to localhost:5000 . Voila! 🎉 ###Current Features:

  • Live Syntax Checking
    • Uses Pylint as checker (only prints out errors and warnings)
    • Live Error Table with Additional Help Suggestions
  • Syntax Highlighting
  • Python 2.7 Complilation
  • Basic Sandboxing
  • Search Within Code

###Customizing Options

  1. Edit app.py to change any pylint options (like showing/hiding hints warnings)
  2. Want Python 3?
  3. Change step 2 from the installation instructions to:
    virtualenv --python=/usr/bin/python3.2 venv
    
  4. Follow rest of instructions

###Future Goals:

  • Make easily embeddable for MOOCs like edX and other education platform
  • Stricter Python Sandboxing via Pypy's sandboxing solution
  • Lower CPU usage
  • Allow users to generate a link to a unique code snippet similar to JSBin

###FAQ: Why did you make this?
I made this so that MOOCs like edX or codecademy could easily embed and use this on their courses so students wouldn't have to go through the frustrations of setting up a Python environment and jump right into Python programming. Also, professors and teachers could easily set up a server and allow students to quickly test out their code with PythonBuddy online.

Has anyone created anything like this before?
There has never been a live syntax checker for python online. Similar projects that are not "live" are http://pep8online.com/ and http://antares.sip.ucm.es/cesar/pylint/

Has can I contribute?
You can 🌟 star my repo, fork my repo, submit a pull request, and/or open issues!

Where's the code for embedding it in MOOCs?
I'm currently working on this over here (for edx specifically): https://github.com/ethanchewy/pybuddy2.0

I want the code to actually compile and run in a certain way? If you want to actually execute the python safely look at my XBlock code: https://github.com/ethanchewy/pybuddy2.0 . Remember to sandbox the code with RestrictedPython or something.

How do I run my own server? https://github.com/ethanchewy/OnlinePythonLinterSyntaxChecker/wiki

###Credits: This was made by Ethan Chiu as a research project under the guidance of Wellesley College professor Eni Mustafaraj.

About

Online Python Editor With Live Syntax Checking and Execution

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages