Conventions
In this book, you will find a number of text styles that distinguish between different kinds of information. Here are some examples of these styles and an explanation of their meaning.
Code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles are shown as follows: "Download the Shapely wheel file that fits our system, looking something like Shapely‑1.5.7‑cp27‑none‑win32.whl
."
A block of code is set as follows:
class LayerGroup: def __init__(self): self.layers = list() self.connected_maps = list() def __iter__(self): for layer in self.layers: yield layer def add_layer(self, layer): self.layers.append(layer) def move_layer(self, from_pos, to_pos): layer = self.layers.pop(from_pos) self.layers.insert(to_pos, layer) def remove_layer(self, position): self.layers.pop(position) def get_position(self, layer): return self.layers.index(layer)
Any command-line input or output is written as follows:
>>> import PIL, PIL.Image >>> img = PIL.Image.open("your/path/to/icon.png") >>> img.save("your/path/to/pythongis/app/icon.ico", sizes=[(255,255),(128,128),(64,64),(48,48),(32,32),(16,16),(8,8)])
New terms and important words are shown in bold. Words that you see on the screen, for example, in menus or dialog boxes, appear in the text like this: "Click on the Inno Setup link on the left side."
Note
Warnings or important notes appear in a box like this.
Tip
Tips and tricks appear like this.