Pylons Development Environment establishment and pylons initial establishment
Pylons Development Environment Construction
Among the many web frameworks, pylons can be said to be a rising star. Combining the advantages of previous frameworks, pylons forms a very flexible framework with a very high degree of modularization, the coupling between modules is low. You can assemble them as needed.
How to install pylons?
For pylons developers, there are three main tools:
1. Virtual Python environment
2. easy_install program
3. python package index
Many developers may have doubts about virtual python environment and may find it a bit redundant, but it is a useful tool in actual development, developers can have several different python environments on a machine, and can switch flexibly as needed.
The pylons installation method can be divided into two types:
I,
1. download virtualenv. py (see PYPI for details)
2. Create virtual environment and perform the following operations. Python virtualenv. py -- no-site-packages mydevenv, where mydevenv is the virtual environment directory to be created
3. install pylons and perform the following operations:/mydevenv/scripts/easy_install "Pylons". To install the specified version of pylons, you can also specify the version of pylons in easy_install, for example, "Pylons = 1.0"
II,
This method is actually the same, but only provides an integration that integrates virtual environment Creation and pylons installation.
1. download go-pylons.py (Please query from http://www.pylonshq.com)
2. Create virtual environment and perform the following operations. Python go-pylons.py -- no-site-packages mydevenv, where mydevenv is the virtual environment directory to be created
After virtualenv is installed, Run \ mydevenv \ scripts \ activate. bat to activate virtualenv.
After installation, you can create a pylons program to verify whether the installation is successful. The procedure is as follows:
1. \ mydevenv \ scripts \ paster create-t pylons helloworld. In this case, pylons will prompt you to perform some basic configurations, such as the template_engine used and whether to use SQLAlchemy (because SQLAlchemy is not installed yet, so the SQLAlchemy selection prompt does not appear), follow the default selection to confirm, that is, select mako as template language
2. Run cd helloworld and switch to the created pylons project directory.
3. Run paster serve -- reload development. ini
4. After the preceding command is run successfully, the following prompt is displayed:
Starting subprocess with file monitor
The Starting server in PID 6636.
Serving on http: // 127.0.0.1: 5000
5. Enter http: // 127.0.0.1: 5000/in the browser. If you can see the word "Welcome to Pylons", congratulations! You have successfully configured the pylons development environment.