0

I'm trying to create an online python editor and want to use Ace Editor to do so. How does one render or compile python code on the browser using Ace Editor's CDN with HTML/JS (https://ace.c9.io)?

I was successful in compiling a live view of HTML and Javascript using the contentWindow.document function; however, I can't seem to figure out how to do the same, except with Python instead.

1 Answer 1

1

ACE Editor is just a code editor, it doesn't include any compiler of any kind. What you are looking for is for a web service that allows you to submit some Python code, then run it on the host server with Python support and return a response.

The best solution would be to implement a Python Sandbox that will run untrusted Python code, ideally through docker or something on a virtual machine where no other code or data of yours could be compromised. Check Pysandbox for a docker solution example.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.