3 ms·
you should check out flask. there isn't much to learn to get going...http://flask.pocoo.org/ http://flask.pocoo.org/ from flask import Flask app = Flask(__na
by dmritard96 12y ago
you should check out flask. there isn't much to learn to get going...http://flask.pocoo.org/ http://flask.pocoo.org/
from flask import Flask
app = Flask(__name__)
@app.route("/")
def hello():
return "Hello World!"
if __name__ == "__main__":
app.run()
- shire 12y agothat 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.
- FraaJad 12y agoIt 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" ?>
- danieldk 12y agoYou can do this in Python too, if you wanted to: http://modpython.org/live/mod_python-3.3.1/doc-html/pyapi-psp.html 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.