Configure Python quixote Web Framework in win7

Source: Internet
Author: User

When I wrote this article, I found a lot of python web FrameWork frameworks. Finally, after consideration, I chose the Quixote FrameWork. []

Advantages of Quixote:
  1. Simple: Quxiote has about 7000 lines of code and contains a large number of comments. If comments are removed, there are only about 2500 lines of code. This is why I chose Quixote to learn Python, because you can easily read the code to see what Quxiote has done.
  2. High efficiency, thanks to the features of the Python language and the simple architecture of Quxiote, And the PTL template.
  3. Security, which also benefits from the simplicity of Quxiote, which enables us to control the framework well and provides some HTML output methods to ensure the security of HTML output.
  4. Free, open source is good!
  5. Tested and has a long history, has been proved to be an efficient, flexible and stable framework in a large number of enterprise applications, the most famous application is Douban (http://www.douban.com ), I also learned about Quxiote from the Douban architecture.

Disadvantages of Quxiote:

  1. No built-in database support and security verification mechanisms
  2. PTL is suitable for programmers and is not suitable for artists to write and modify front-end code.
  3. The built-in server does not support debugging well. If you use simple_server.py for debugging, you can trace it, but if you modify the code, you must restart the server. If you use cgi, although you do not need to restart the server after modifying the code, however, codes cannot be tracked, and the Session support provided by Quixote will be invalid unless Session persistence is used.
  4. Without built-in WSGI support, WSGI is a widely used specification (Web Server Gateway Interface) proposed in Python PEP, enabling compatibility between Python Web Server and Python Web Framework.
Summary:

First, for those who want to learn Python Web development, using Quixote will bring a lot of benefits. Quxiote is very similar to Python and does not provide a good development process like Django and Pylons, it can also be used quickly, but it is difficult to understand what these frameworks do at a low level. At least for beginners, using these frameworks is not very suitable. Quixote has a small amount of code, but it includes many core functions, such as Request, Response, Session, and WebServer.

Second, the simplicity of Quixote makes Quixote very flexible. It also means that you need to do more secondary development. Therefore, to use Quixote to make a good website, you still need to have a certain Python Foundation. Such as database development and Python multi-threaded applications.

Quixote does not provide database support and security authentication mechanisms for us, but you can also use some existing frameworks to solve this problem, such as SqlAlchemy. SqlAlchemy can be said to be a Python ORM standard, just like Hibernate in Java, so it is the best choice. Many people do not choose Django because Django's ORM solution is not satisfactory.

In addition, I do not use the PTL of Quixote. After all, there are better technologies to replace him in the development of the times. For example, the Python template engine Mako and Douban also use Mako in the new development.

The introduction of SqlAlchemy and Mako and articles integrated with Quixote will also be released one after another.

How to configure the web framework

1. Set the Path attribute in the computer environment variable and add the Python installation Path.

C: \ Python26

2. Run:

Python-c "import OS, quixote; print OS. path. dirname (quixote. _ file __)"

Run

Python setup. py install

Run

Server/simple_server.py

Okay. Finally, open the browser.

Http: // localhost: 8080

If it can be enabled, it will prove that you have installed successfully.

 

 

 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.