Installing Python Modules
This document describes the Python Distribution Utilities (“Distutils”) from the end-user’s point-of-view, describing how to extend the capabilities of a standard Python installation by building and installing third-party Python modules and extensions. Introduction Although Python’s extensive standard library covers many programming needs, there often comes a time when you need to add some new functionality to your Python installation in the form of third-party modules. This might be necessary to support your own programming, or to support an application that you want to use and that happens to be written in Python. In the past, there has been little support for adding third-party modules to an existing Python installation. With the introduction of the Python Distribution Utilities (Distutils for short) in Python 2.0, this changed. Best case: trivial installation Of course, things will not always be that easy. The new standard: Distutils Standard Build and Install Platform variations Notes:
Welcome to Jinja2 — Jinja2 2.8-dev documentation
Jinja2 is a modern and designer friendly templating language for Python, modelled after Django’s templates. It is fast, widely used and secure with the optional sandboxed template execution environment: <title>{% block title %}{% endblock %}</title><ul>{% for user in users %} <li><a href="{{ user.url }}">{{ user.username }}</a></li>{% endfor %}</ul> Features: sandboxed executionpowerful automatic HTML escaping system for XSS preventiontemplate inheritancecompiles down to the optimal python code just in timeoptional ahead of time template compilationeasy to debug. Line numbers of exceptions directly point to the correct line in the template.configurable syntax Additional Information If you can’t find the information you’re looking for, have a look at the index or try to find it using the search function:
Walt Disney Animation Studios
BRDF Explorer is an application that allows the development and analysis of bidirectional reflectance distribution functions (BRDFs). It can load and plot analytic BRDF functions (coded as functions in OpenGL's GLSL shader language), measured material data from the MERL database, and anisotropic measured material data from MIT CSAIL. Graphs and visualizations update in realtime as parameters are changed, making it a useful tool for evaluating and understanding different BRDFs (and other component functions). Motivation In the pursuit of visual realism in our films, we have spent a considerable amount of time exploring the strengths and weaknesses of different BRDFs. Screenshot A screenshot is worth a thousand words: Major Features Get Started You can get the source code or win32 binary at github. The only dependencies are Qt, OpenGL, and a relatively recent GPU - we haven't verified the requirements, but anything supporting DX10 / Pixel Shader 4.0 will probably be fine. Future Plans
TeXample
MySQLdb User's Guide
If you want to write applications which are portable across databases, use MySQLdb, and avoid using this module directly. _mysql provides an interface which mostly implements the MySQL C API. For more information, see the MySQL documentation. Okay, so you want to use _mysql anyway. The simplest possible database connection is: import _mysql db=_mysql.connect() This creates a connection to the MySQL server running on the local machine using the standard UNIX socket (or named pipe on Windows), your login name (from the USER environment variable), no password, and does not USE a database. db=_mysql.connect("localhost","joebob","moonpie","thangs") This creates a connection to the MySQL server running on the local machine via a UNIX socket (or named pipe), the user name "joebob", the password "moonpie", and selects the initial database "thangs". We haven't even begun to touch upon all the parameters connect() can take. db=_mysql.connect(passwd="moonpie",db="thangs")
Iterators, Iterables, and Generators! Oh, my!
By: Mark Mruss Note: This article was first published the January 2008 issue of Python Magazine Iterators, iterables, and generators are features handled so wall by Python that people programming in other languages cannot help but drool over. Fortunately for us, creating iterators, iterables and generators is a relatively simple task. Introduction In this article I’m going to introduce three related Python features: iterators, iterables, and generators. Note: Classes that define the __getitem__ function are also considered iterables, but since that falls outside the scope of this article, it will not be covered here. In this tutorial, I will begin by discussing iterators, the most basic concept. Iteration in Python Iterators objects are used in Python in order to iterate over an objects data. my_list = [1,2,3] for num in my_list: print num This code will iterate over the list object my_list and print out all of the list items , i.e., the numbers 1, 2, and 3. An initial example Listing 1
The Django Book
Welcome | 3delight
Qualitative Reasoning Group
Python Programming - Wikibooks, collection of open-content textbooks
Python Programming From Wikibooks, open books for an open world Jump to: navigation, search This book describes Python, an open-source general-purpose interpreted programming language available for a broad range of operating systems. Contents[edit] Intro[edit] Overview Getting Python Setting it up Interactive mode Self Help Basics[edit] Creating Python programs Variables and Strings Basic syntax Sequences (Strings, Lists, Tuples, Dictionaries, Sets) Data types Numbers Strings Lists Tuples Dictionaries Sets Basic Math -- redundant to "Operators" Operators Control Flow Decision Control Conditional Statements Loops Functions Scoping Input and output Files Text Modules Classes Exceptions Errors Source Documentation and Comments Idioms Advanced[edit] Decorators Context Managers Reflection Metaclasses Namespace Tips and Tricks Modules[edit] Standard library modules[edit] Standard Library Regular Expression External commands XML Tools Email Threading Sockets GUI Programming Tkinter CGI interface WSGI web programming Extracting info from web pages Math
Python Django tutorial 1 installing easy_install, virtualenv & django
Super handy set of Python libraries, built for Windows. by fatebeats May 20