Python Cookbook

[SYMBOL] [A] [B] [C] [D] [E] [F] [G] [H] [I] [J] [K] [L] [M] [N] [O] [P] [Q] [R] [S] [T] [U] [V] [W] [X] [Y] [Z]

samplesort 

SAX 

    ContentHandler  [See ContentHandler]

    using to check well-formedness 

scalar elements, determining 

scanner 

Schwartzian transform 

ScientificPython package 

searching 

    binary search algorithm 

    of unhashable items 

seek 

select statement, Python equivalent 

self 

self.lock.acquire 

semicolons (;) 

separator entries 

sequences

    finding items in deeply nested sequences 

    looping on 

    matching sets 

    membership tests on 

    predicate testing, evaluation 

    removing duplicates from 

        while maintaining sequence order 

    unbounded iterators, filtering output 

serializing data 

serve_forever 

Server class 

server.py  2nd 

ServerProxy class 

servers

    TCP servers, writing 

service_running 

servicemanager module 

servlets

    Jython, running with 

Set class 

set class, implementing 

_ _setattr_ _ 

setdefault  2nd 

setmode (msvcrt module) 

setPaletteBackgroundColor 

sets

    matching 

    modeling 

_ _setstate_ _ 

setup.py 

SetValueEx 

setvbuf 

sgmllib module 

shallow copies 

shallow parsers 

shebang line 

shelve module 

show_paragraphs 

shutil.copy 

SimpleXMLRPCServer class 

single inheritance 

single quotes 

Singleton design pattern  2nd 

    alternatives to 

    avoiding, with Borg idiom 

    drawbacks to 

SIP 

sitecustomize.py 

    imported modules, automating end-of-line conversions on 

slicing 

_ _slots_ _ 

smtplib module 

SO_REUSEADDR 

SOAP (Simple Object Access Protocol) 

    writing web services that support 

socket datagrams, passing messages with 

    passing large messages 

socket module  2nd 

    big-endian byte order, specification by 

    finding your own hostname and IP address 

    IP addresses, conversion, dotted quad to long integers 

socket.inet_aton and socket.inet_ntoa 

sockets

    connecting to on a remote machine 

SocketServer module 

sort 

    passing a comparison function to 

sorted lists, maintaining 

sorting 

    algorithms used in Python 

    by item or attribute 

    by one field, then another 

    of dictionaries 

    guaranteeing sort stability 

    of object lists, using object attributes as criteria 

    of objects, using ORDER BY syntax 

    quicksort in three lines 

    reverse order, listing in 

    reverse sorting 

    stable sorts 

Soundex algorithm 

source code in Python, colorizing 

space (' ') joiner 

spaces

    conversion to or from tabs 

    trimming from strings 

SPARK parser generator 

    introspection, use by 

split  2nd  3rd  4th 

split_at 

split_by 

splitlines  2nd 

SQL

    implementations for relational databases 

    SQL DDL, creating from an Access database 

SQL ORDER BY clause 

stable sorts 

standard library 

standard output

    Unicode characters, printing to 

startElement 

StartElementHandler 

StartService 

stat (poplib module) 

state 

static methods

    class methods, and 

    implementing 

    staticmethod 

    staticmethod type 

staticmethod 

staticmethod type 

Stevens, W. Richard 

StopService 

storbinary 

storing per-thread information 

storlines 

_ _str_ _ 

string fields, reverse sorting with DSU 

string module 

string object methods 

string substitution in a file 

string-formatting operator (%)  2nd  3rd 

    named-values variant 

StringIO module 

strings  2nd 

    accessing substrings 

    aligning 

    case, controlling 

    changing the indentation of a multiline string 

    combining 

    concatenation 

    converting between different naming conventions 

    converting between tabs and spaces 

    encoding and decoding 

    evaluating code within 

    filtering for a character set 

    immutability 

    looping on characters  2nd 

    matching character sets 

    multiple string substitutions 

    processing one character at a time 

    quotes, and 

    raw strings 

    reversing by words or characters 

    sequences, compared to 

    single characters, access of 

    testing for integer representation 

    testing if an object is string-like 

    trimming space from the ends of 

    Unicode strings 

    Unicode, converting to 

    writing large strings to a file 

strip (string object method) 

strptime 

struct module 

struct.unpack 

structured data, processing of selected pairs 

stub_compare_func 

sub (re module)  2nd  3rd 

subclassing

    currying, as an alternative to 

subscribe.py 

super 

Super class 

super keyword in Java, Python equivalent to 

superclasses

    _ _init_ _, calling 

    implementations of methods, calling 

SWIG 

    C and C++, Python extension module tools for 

    SWIG-generated modules in a multithreaded environment 

switch statement, Python equivalent 

Sybase, access via JDBC 

sys._getframe  2nd 

    simulating in pre-2.1 Python versions 

sys.exc_info 

sys.excepthook 

sys.modules

    addition of newly generated modules 

sys.path.append 

system administration 

    Apache servers, hits on per IP address, calculating 

        client cache hits, calculating 

    commands, running repeatedly 

    passwords, generating randomly 

        generating non-randomly 

    polling 

    Unix network interface, status checking 

    Windows  [See under Windows]

Категории