Skip to content

varun31415/python-in-the-browser

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Python in the browser

This github repo is an implementation to run python in the browser using flask.

How it works

Here is how the code works:

  1. The client sends the code to the flask server.
  2. The flask server writes the code to output.py and runs the program using subprocess.Popen(["python3 output.py"], shell=True). Note the the flask server makes some changes to the code so that the output is written to output.txt
  3. Now, the client sends lots of requests to output.txt, the file that the output of the program is written too. The client recieves the data and shows it on the page. The client keeps updating the output until the program is finished.

About

Flask implementation to run python in the browser.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published