Ask coding questions

← Back to all posts
HTML Preview and Python
h
quvintu (0)

Okay. This is difficult to explain, but I want to be able to view a HTML file while a Python file is running as the main file. I'm pretty new to coding and don't understand complex solutions, but I'll try my best.
The (relevant) file tree looks something like this:

interactive
  |-js
    |-script.js
  |-css
    |-style.css
  |-index.html
other-folder
  |-main.py
  |-other stuff
    |-irrelevant_here.py
  |-resources
    |-settings.json

I hope this is descriptive enough.

I'll need to be able to use the HTML/CSS/JS to visually edit the contents of settings.json, too.
Thanks in advance!

Comments
hotnewtop
RYANTADIPARTHI (6006)

html, and python don't mix except in frameworks. So i don't think that's possible.

PaoloAmoroso (186)

My understanding is unless your REPL runs an HTTP server, such as when using a web framework like Django or Flask, you can't preview HTML files because Repl.it doesn't provide HTML preview support in non HTML5 REPLs. Therefore, I encourage you to upvote a feature request I submitted to add the feature to Repl.it