Re: [Edu-sig] Simplest webapps

2018-04-09 Thread Jurgis Pralgauskis
I made a small adapter for web2py to be used nearly as PHP for beginners :) web2py templates have the code-html mix with full Python syntax enabled (just indentation is ignored with html, so "pass" is used to end logical block). so with my example you can programm just templates (views)

Re: [Edu-sig] Simplest webapps

2018-04-03 Thread kirby urner
On Mon, Apr 2, 2018 at 4:16 PM, Carl Karsten wrote: ​... ​ > http://www.web2py.com/init/default/download > "After download, unzip it and click on web2py.exe (windows) or > web2py.app (osx). To run from source, type: python2.7 web2py.py" (I > guess Linux users are good

Re: [Edu-sig] Simplest webapps

2018-04-03 Thread Aivar Annamaa
Big thank you to everybody for the pointers! I have now lot to test and think about. best regards, Aivar 03.04.2018 02:16 Carl Karsten kirjutas: web2py was written by a college professor to teach web development on a tight schedule. he didn't like the existing ones that took too long to get

Re: [Edu-sig] Simplest webapps

2018-04-02 Thread Carl Karsten
web2py was written by a college professor to teach web development on a tight schedule. he didn't like the existing ones that took too long to get a Hello World thing up and running. "pick a db engine" is not something that needs to be part of the 2 hours of class time this week. but, it is

Re: [Edu-sig] Simplest webapps

2018-04-02 Thread Andrew Harrington
Bottle sound like it makes things very simple. I also have a chapter introducing server-side Python interaction in very simple cases. http://anh.cs.luc.edu/python/hands-on/3.1/handsonHtml/ch4.html It does come well after function introduction. Dr. Andrew N. Harrington Computer Science

Re: [Edu-sig] Simplest webapps

2018-03-31 Thread Wes Turner
Web programming is fun but dangerous. Things as simple as 'it reads a file off the disk and sends it to the user' can unintentionally expose every readable file to whoever or whatever can access localhost. ```python os.path.join('here', '/etc/shadow') path = 'here/' + '../../../../etc/shadow' ```

Re: [Edu-sig] Simplest webapps

2018-03-31 Thread Wes Turner
Bottle is a single file web microframework. https://github.com/bottlepy/bottle https://github.com/bottlepy/bottle/blob/master/bottle.py > Example: "Hello World" in a bottle ```python from bottle import route, run, template @route('/hello/') def index(name): return template('Hello

Re: [Edu-sig] Simplest webapps

2018-03-31 Thread Jason Blum
http://anvil.works/ is a pretty interesting approach to Python web applications. On Fri, Mar 30, 2018 at 2:05 PM, kirby urner wrote: > > Hi Aivar -- > > I think it's a fine idea to write simple Python scripts that write HTML > files, which you may then pull up in the

Re: [Edu-sig] Simplest webapps

2018-03-30 Thread kirby urner
Very interesting. I note that free users are relegated to Python 2.7 Server modules can be Python 3.6 (outside the free version) Client stuff compiles to JavaScript and is approximately 2.7 That's a bit confusing maybe. I try to avoid 2.7 but that's not easy. In my Coding with Kids work, we

Re: [Edu-sig] Simplest webapps

2018-03-30 Thread kirby urner
Hi Aivar -- I think it's a fine idea to write simple Python scripts that write HTML files, which you may then pull up in the browser. There's no need to put a server behind static web pages. So, for example, I'll have my students write a page of bookmarks: # -*- coding: utf-8 -*- """ Created

Re: [Edu-sig] Simplest webapps

2018-03-28 Thread Sebastian Silva
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

Re: [Edu-sig] Simplest webapps

2018-03-28 Thread Andre Roberge
See below for comments. On Wed, Mar 28, 2018 at 4:18 AM, 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""" > > >

[Edu-sig] Simplest webapps

2018-03-28 Thread Aivar Annamaa
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""" {greeting} {name}! """) I'd like to allow them start writing web-apps without