> Present day development deals with chunks of code in different languages, all put in the same file. It just kills me to code Python+JS+HTML in a single file
That got me worried - you probably don't need to suffer this. What are you using this multilanguage file for? You shouldn't put lots of JS inside HTML and certainly not embed Python code inside it (nor the reverse).