[Edu-sig] Simplest webapps
Sebastian Silva
sebastian at fuentelibre.org
Wed Mar 28 09:33:46 EDT 2018
Hi,
I wrote a Python IDE / runner for the web, that supports the code you
wrote as-is: https://educa.juegos/
As Andre Roberge, `input` works like `prompt` in Javascript.
You can try copy pasting the code in the IDE - your feedback is welcome
at the repository <https://github.com/somosazucar/Jappy>.
It will be hard to avoid functions in Javascript since it wants to use
callback functions all the time.
Regards,
Sebastian
On 28/03/18 02:18, Aivar Annamaa wrote:
>
> Hi!
>
> Let's say my students are able to write programs like this:
>
> name = input("name")
>
> if name == "Pete":
> greeting = "Hi"
> else:
> greeting = "Hello!"
>
> print(f"""
> <html>
> <body>
> {greeting} {name}!
> </body>
> </html>
> """)
>
> I'd like to allow them start writing web-apps without introducing
> functions first (most web-frameworks require functions).
>
> It occurred to me that it's not hard to create a wrapper, which
> presents this code as a web-app (input would be patched to look up GET
> or POST parameters with given name).
>
> This approach would allow simple debugging of the code on local
> machine and no extra libraries are required in this phase.
>
> Any opinions on this? Has this been tried before?
>
> best regards,
> Aivar
>
>
>
> _______________________________________________
> Edu-sig mailing list
> Edu-sig at python.org
> https://mail.python.org/mailman/listinfo/edu-sig
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/edu-sig/attachments/20180328/ed4bc4fc/attachment.html>
More information about the Edu-sig
mailing list