+ 15

Is there a method or means on the playground to wrap html around a python code / no console window / regular screen output ?

I have a python code already but I want to have it output on the regular website screen with frontend html and css dynamic viewing ~ I know with ruby it can be put inside a container ~ but I'm not as familiar with html wrapping python Anyone truly familiar ~ Searched stackoverflow / stackexchange / and several other resources but ~ no luck. I know there are a few Python EXPERTS here so I hope to find an answer ~

2nd Nov 2018, 3:55 PM
BroFar
BroFar - avatar
13 Antworten
+ 9
This looks like a job for a microframework like Flask or Karrigell. You can also try web2py.com as it comes with very handy packages inside. Other than that, I doubt it can be done anyhow without a Python server behind. If you plan on hosting a proper application project, you might try using heroku.com For small, in-house projects it has far more than necessary number of goodies, but still works seamlessly. Heroku has an interactive, "for-dummies"-like introductory training course on how to go around it and how to deploy your first application in it, which you do on-the-go. The initial result is usually this teapot here (made it in March, had no time to actually focus on proper deployment yet ;) https://my-1st-python-app.herokuapp.com The neat thing is that you get a nice looking URL :)
3rd Nov 2018, 8:12 AM
Kuba Siekierzyński
Kuba Siekierzyński - avatar
+ 8
BroFarOps 🦃&🎃🍰 Heroku should take care of the hosting thing, I think. Also, it does not reveal your code :)
3rd Nov 2018, 4:41 PM
Kuba Siekierzyński
Kuba Siekierzyński - avatar
+ 4
I tried embedding with just using the <% infront and closing %> but that didn't seem to work ~ questioning if I need to do this with each line or what ~ One doc said it should work like php it didn't.
2nd Nov 2018, 6:23 PM
BroFar
BroFar - avatar
+ 4
I’m a noob at Python. However, I remember seeing Burey‘s code using Skulpt to power the Python turtle. Around halfway down www.skulpt.org, there is some code to power enable Python in HTML! BUt Skulpt uses Python 2, not Python 3, so it might be a little tricky to write code. I hope I’ve answered your question.
3rd Nov 2018, 4:41 AM
Rowsej
Rowsej - avatar
+ 3
Sorry Rowsej that is not it and Anggara Lol you are right that is not it✔
3rd Nov 2018, 4:51 AM
BroFar
BroFar - avatar
+ 3
BroFarOps 🦃&🎃🍰 Thanks sir! Going to find out how SoloLearn does it on the website... a lot of work!
3rd Nov 2018, 4:58 AM
Rowsej
Rowsej - avatar
+ 3
BroFarOps 🦃&🎃🍰 Yes, he would be able to help!
3rd Nov 2018, 5:00 AM
Rowsej
Rowsej - avatar
+ 3
Definitely on the right track PyDan
3rd Nov 2018, 4:16 PM
BroFar
BroFar - avatar
+ 2
I wish Kuba Siekierzyński would answer as one of the main python contributors
3rd Nov 2018, 5:00 AM
BroFar
BroFar - avatar
+ 2
I think it maybe Brython (https://brython.info)
3rd Nov 2018, 3:24 PM
danvetio
danvetio - avatar
+ 2
Many great little projects leading back to github from brython.info ~ looks challenging enough for what I was looking for but I cant host it here as Kuba Siekierzyński basically indicated - I believe...
3rd Nov 2018, 4:35 PM
BroFar
BroFar - avatar
+ 1
Rowsej i do however like the resource 👍
3rd Nov 2018, 4:54 AM
BroFar
BroFar - avatar
0
waduh aing teu bisa
3rd Nov 2018, 4:49 AM
Anggara Lol
Anggara Lol - avatar