Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

you should check out flask. there isn't much to learn to get going...http://flask.pocoo.org/

from flask import Flask

app = Flask(__name__)

@app.route("/")

def hello():

    return "Hello World!"
if __name__ == "__main__":

    app.run()


that would be very confusing to understand for a beginner. PHP you can write <?php echo "Hello world" ?> right in a html file and see it just by refreshing the page.


It is confusing if you don't know the difference between a page templating language and a web framework. If ease of writing "hello world" is what matters, Python:

    print "hello world"
beats PHP:

    <?php echo "hello world" ?>


You can do this in Python too, if you wanted to:

http://modpython.org/live/mod_python-3.3.1/doc-html/pyapi-ps...

But it's not a very good architecture, in the meanwhile we had better approaches, such as MVC and MVVM.

Anyway, CS is not web programming, but should focus on the fundamentals of computer science, for which there are far better languages than PHP.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: