5 Permission is hereby granted, free of charge, to any person obtaining
6 a copy of this software and associated documentation files (the
7 "Software"), to deal in the Software without restriction, including
8 without limitation the rights to use, copy, modify, merge, publish,
9 distribute, sublicense, and/or sell copies of the Software, and to
10 permit persons to whom the Software is furnished to do so, subject to
11 the following conditions:
13 The above copyright notice and this permission notice shall be included
14 in all copies or substantial portions of the Software.
16 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
17 KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
18 WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19 NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20 LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21 OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22 WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
29 <title>Python Overview</title>
33 This section will provide a brief overview of
34 the Python programming language.
35 Skip this section if you are already familiar with Python
36 (or you're really intent on diving into &SCons;
37 and just picking up things as you go).
43 Python has a lot of good
44 documentation freely available on-line
45 to help you get started.
46 The standard tutorial is available at XXX.
53 Python is very easy to pick up.
59 Python variables must be assigned to before they can be referenced.
65 Assignment is like most programming languages:
74 Function calls look like most language function calls:
82 Define functions like so:
87 The number of parameters
93 Strings can be enclosed in single quotes or double quotes,
94 backslashes are used to escape characters,
95 triple-quote syntax lets you include quotes and newlines,
96 raw strings begin with 'r'.
102 Lists are enclosed in square brackets,
103 list items are separated by commas.
104 List references use square brackets and integer index values,
105 slice notation lets you select, delete or replace a range.
111 Dictionaries (hashes) are enclosed in curly brackets,
112 : separates keys from values,
114 Dictionary values are referenced using square brackets.
120 Access class attributes (including methods) using a '.'.
126 if: statements look like
128 elif: statements look like
130 else: statements look like
136 for: statements look like
138 while: statements look like
140 break statements look like
142 continue statements look like