The Student Room Group

Python in HTML.

Is there a way to run a website that would display a python program?
Reply 1
Original post by SamRob85
Is there a way to run a website that would display a python program?


Be more specific. You can embed a Python interpreter on a website so you could have a python program.

Google 'online Python interpreter'.
Reply 2
Original post by Juichiro
Be more specific. You can embed a Python interpreter on a website so you could have a python program.

Google 'online Python interpreter'.

I was thinking how I could put it on my own website.
Reply 3
Original post by SamRob85
I was thinking how I could put it on my own website.


Embed a Python interpreter in your website and put the code in your Python compiler. Voila!
Reply 4
Original post by Juichiro
Embed a Python interpreter in your website and put the code in your Python compiler. Voila!

I know this sounds silly, but how do you embed something, is it with an iframe, I have forgottem.
Reply 5
Original post by SamRob85
I know this sounds silly, but how do you embed something, is it with an iframe, I have forgottem.


It is not easy. If you want to do web apps, Python is not the best choice. Use JavaScript if you want to write programs for the web. JavaScript is not as pretty as Python but if you want to do general stuff on the web, JavaScript gets the job done.
Reply 6
Original post by Juichiro
It is not easy. If you want to do web apps, Python is not the best choice. Use JavaScript if you want to write programs for the web. JavaScript is not as pretty as Python but if you want to do general stuff on the web, JavaScript gets the job done.

How would I do it though if I did want to use python?
Reply 7
Original post by SamRob85
How would I do it though if I did want to use python?


You are still going to get your hands dirty with JavaScript.

Go the website below

http://www.skulpt.org/

At the bottom of the page you will some code, copy all of it and paste it on an empty webpage. Acess the webpage normally and you should have an online compiler on Python.
Reply 8
You could also send input received on the page to a Python script via PHP and return output in the same way.
Reply 9
Original post by Juichiro
You are still going to get your hands dirty with JavaScript.

Go the website below

http://www.skulpt.org/

At the bottom of the page you will some code, copy all of it and paste it on an empty webpage. Acess the webpage normally and you should have an online compiler on Python.

I did that and this came out.
Reply 10
Original post by SamRob85
I did that and this came out.


Google is your friend. I am quite sure there is a guide in the internet so surf the net and you will find it.
Reply 11
Original post by Juichiro
Google is your friend. I am quite sure there is a guide in the internet so surf the net and you will find it.

I have found a few websites but am relativity new to programming and so do not understand.

Quick Reply

Latest

Trending

Trending