失效链接处理 |
The Definitive Guide to Pylons PDF 下载
本站整理下载:
相关截图:
主要内容:
Thanks must go primarily to Ben Bangert and Philip Jenvey for their work on Pylons. Ben in particular is the rock of the Pylons community and should take huge credit for its success. Thanks
also go to Ian Bicking who is responsible for Paste, FormEncode, and other Pylons-related projects and who was kind enough to let me use a couple of examples from the FormEncode documentation in the book. Thanks to Mike Bayer for his work on SQLAlchemy and Mako and for
reading the SQLAlchemy chapter alpha online and giving his comments at an early stage. Thanks
also to Graham Higgins for all his help, particularly when the idea of writing a book was first
being discussed.
Thanks to all the visitors to the http://pylonsbook.com site who read the online alpha and gave
comments. The following people in particular provided detailed feedback for which I am especially
grateful: Chris AtLee, Christine Simms, Harri Vartiainen, Henry Miller, Mike Coyle, Nick Daly, and
Krzysiek Tomaszewski. This Pylons book wouldn’t be what it is without all your efforts, and I apologize if not all of your suggestions made it into the final text.
I’d like to thank Apress for sharing the vision for this book and allowing me to release it under
an open source license so that it can be improved and built upon by the Pylons community, and I’d
like to thank everyone at Apress who helped me with this book for their time and energy.
Thanks too have to go to Mike Orr, the technical reviewer. He did an excellent job of reviewing
the first draft and pushed me toward making this book more about Pylons and less about the tools
and techniques I use in my own web development projects, and that can only be a good thing for
you, the reader.
I’d also like to thank some less obvious people. Thanks to all the people who work at the Hub in
Islington, London, on social enterprise projects. Thanks to Luke, Stephen, Chris, Tom, Holly, Maria,
Fred, and everyone else I’ve discussed this book with. You’ve been an inspiration and enormously
fun to share a workspace with.
Thanks to Richard Noble for giving me the space and support I needed to work on the book
when we were both keen to start our new business venture together and for being great company
when I was working on the book.
Finally, I’d like to thank Beth Christmas, the project manager for this book. She, more than anyone else, can take credit for this book ever reaching the publishing stage. I haven’t made her life
easy, but she was always there to support me when I needed support and push me when I needed
pushing. I appreciate her efforts enormously and hope they are repaid to some small extent by you
all knowing how grateful I am to her.
xxiii
Source Code and Updates
This book contains many source code examples as well as the code for a complete hierarchical wiki
application called SimpleSite. All the source code is available to download from the Apress web site
at http://www.apress.com or from http://pylonsbook.com. The source code includes a README.txt
file that outlines what each example demonstrates. The examples were all tested in early November
2008 with Pylons 0.9.7 and SQLAlchemy 0.5 release candidates.
This book is released under the GNU Free Documentation License (the same license used by
Wikipedia), so I have also been able to publish the text online. You can find the online versions of
the chapters at http://pylonsbook.com.
The Pylons community is always dynamic and constantly improving, so if you find a problem in
the text or source code with the version of Pylons you are using, I encourage you to report it via the
http://pylonsbook.com web site so that the online chapters can be updated. It is my hope that, with
your help and the help of the Pylons community, this book will continue to be a useful resource for
a long time to come. If you are interested in contributing to the online version of this book or in helping me review the updates or contributions that other readers send in, I’d love to hear from you. My
address is feedback@pylonsbook.com.
I very much hope you enjoy the book and find it a useful resource to help you learn and fully
understand Pylons. I’m sure you’ll find working with Pylons very liberating, and I look forward to
meeting you online if you choose to take part in the Pylons community to share your thoughts
and ideas.
xxv
Installing Pylons
Pylons is written in the Python language and is designed to run on any platform that supports a
modern version of Python. It can therefore be used on Windows, Mac OS X, Linux, BSD, and many
other platforms. Because Python is an interpreted language, Pylons applications you write for one
platform will be able to run on other platforms without any modification.
You can install Pylons in quite a few different ways depending on your needs, but the three
main tools most Pylons developers use are as follows:
• A virtual Python environment
• The easy_install program
• The Python Package Index
In this chapter, you’ll look at what a virtual Python environment is before turning your attention to the Python Package Index and the easy_install program. Once you have a thorough understanding of the install processes used by Pylons, you’ll turn your attention to Python itself and look
at any subtleties you need to be aware of on your particular platform, including how to install packages that include C and C++ extensions.
■Note If you don’t have a copy of Python installed yet, you might want to jump ahead to the platform-specific
notes later in this chapter to learn how to install a recent version of Python such as 2.5 or 2.6 on your platform.
However, since almost all platforms apart from Windows already come with a recent version of Python, you’ll
probably be able to create a virtual Python environment straightaway.
Quick Start to Installation for the Impatient
Pylons is actually very easy to install. If you are not so interested in the details but just want to get
up and running with a Pylons installation on Linux as quickly as possible, the following steps show
you how. You’ll find steps specific to Windows and Mac OS X later in the chapter.
|