0

I want to learn Python for Web Programming. As of now I work on PHP and want to try Python and its object oriented features. I have basic knowledge of python and its syntax and data strucures.

I want to start with making basic web pages - forms, file upload and then move on to more dynamic websites using MYSQl.

As of now I do not want to try Django or for that matter any other frameworks. Is python with cgi and MySQLdb modules a good start?

Thanks

asked Aug 28, 2012 at 9:22
3
  • 1
    Why do you not want to use a framework? Commented Aug 28, 2012 at 9:23
  • 2
    Web Microframeworks Battle Commented Aug 28, 2012 at 9:29
  • I tried using Django - I am learning it side by side but it requires a lot of prerequisites. Plus I have my website on Godaddy - I want something that I can test on godaddy servers without much configuration. Commented Aug 28, 2012 at 9:30

6 Answers 6

2

I recommend Pyramid Framework!

answered Sep 4, 2012 at 17:29
Sign up to request clarification or add additional context in comments.

Comments

1

I would recommend using some WSGI (WebServer Gateway interface) lightweight frameworks. WSGI is the commonly recognized web interface on python and will let you manage basic HTTP request (GET, POST, HEAD ...), Django is also WSGI based.

http://wsgi.readthedocs.org/en/latest/frameworks.html

You can also write a basic WSGI app if you don't want to use any framework. It's very easy and you can easily test it / deploy it using Paste Deploy or Apache + mod_wsgi.

http://pythonpaste.org/deploy/

answered Aug 28, 2012 at 9:26

Comments

1

Having used both Flask and Django for a bit now, I must say that I much prefer Flask for most things. I would recommend giving it a try. Flask-Uploads and WTForms are two nice extensions for the Flask framework that make it easy to do the things you mentioned. Lots of other extensions available.

If you go on to work with dynamic site attached to a database, Flask + SQL Alchemy make a very powerful combination. I much prefer the SQLAlchemy ORM to the django model ORM.

answered Aug 28, 2012 at 13:30

Comments

0

If nothing else it will show you why you want to use a framework, should be a really valuable learning experience. I say go for it.

answered Aug 28, 2012 at 9:26

Comments

0

Depend on the level of your understanding on web programming, and for learning purpose, you can start from very basic such as the module SimpleHTTPServer, or a bit more practically, a micro framework such as Paste, or Bottle. Then you head for a full-stack framework like Django.

answered Aug 28, 2012 at 9:44

Comments

0

I would really recommend that you try Flask. It doesn't require much overhead such as Pyramids and Django, and it will give you the opportunity to play (not that it's a toy).

from their docs: install Flask:

>> pip install Flask

then run a simple web-app :)

from flask import Flask
app = Flask(__name__)
@app.route("/")
def hello():
 return "Hello World!"
if __name__ == "__main__":
 app.run()
answered Aug 28, 2012 at 10:56

Comments

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.