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]

C and C++

    breakpoints, setting in dynamically loaded extensions 

    C arrays, translating Python sequences into 

    C-coded Python extensions  [See C-coded Python extensions]

    connecting C routines to Python 

    enum type 

        simulating in Python 

    performance, measuring compared to Python 

    Python extension module tools for  2nd  3rd 

    ternary operator, simulating in Python  2nd 

C-coded Python extensions 

    coding the methods of a Python class 

    compiler requirements 

    debugging with gdb 

    implementing C function callbacks to a Python function 

    memory problems, debugging 

    new and borrowed references, preventing problems with 

    Python sequence, accessing item by item 

    releasing the Python global interpreter lock 

    returning None from a callable C function 

        Py_None and reference counts 

    SWIG-generated modules in a multithreaded environment 

caching the return values of functions 

_ _call_ _  2nd  3rd 

    composing functions using 

callables, currying 

callback functions

    avoiding Lambda in writing 

"can't pickle file objects exception" TypeError 

canonicform 

Canvas widget 

capitalize (string function) 

cascade entries 

case statement, Python equivalent 

case, conversions between upper and lower 

The Celestial Emporium of Benevolent Knowledge 

center (string object method) 

central.py  2nd  3rd 

CGI (Common Gateway Interface) 

    cgi module  2nd 

    CGI scripts 

        location of import statements 

        output of 

        writing a script 

    CGI testing 

        directing error output to standard output 

    handling URLs in a script 

    using a simple dictionary for CGI parameters 

cgi.escape 

cgitest.py 

character encodings 

    MIME parts 

character sets 

CharacterDataHandler 

characters

    contrasted with bytes 

    converting to values 

characters method 

checkbutton entries 

checkcache 

chmod, GUI implementation 

chr 

class adoption 

class methods 

    implementing 

class objects 

class statement 

_ _class_init_ _ 

classes

    classic classes 

    constructors 

    controlling class behavior by defining a custom metaclass 

    dictionaries, wrapping 

    functionality, adding to 

    getting all members of a hierarchy 

    inner classes 

    memory usage, tracking 

    modeling a set 

    Python recoded to C 

    saving and restoring via cPickle module 

    tracking instances of 

classmethod 

Classname.method(self, ...) syntax 

ClassWithClassMethods 

clearcache 

client.py 

CLIs (command-line interfaces) 

close 

CloseKey 

cmp 

cmp(s1, s2), Python equivalent 

code reuse by inheritance 

code, replacing with code-execution results 

collecting a bunch of named items 

collections, implementing 

color scales, creating 

color, using to provide feedback to user input 

COM automation

    accessing ADSI via 

    WSH, accessing via 

Command class 

command entries 

command files, parsing 

command-line interfaces  [See CLIs]

commands, running repeatedly 

commas, use in packing 

comparison functions compared to DSU 

compile 

compiler requirements, C-coded Python extensions 

compose 

composition (of functions) 

computer languages, application-specific 

concurrent processing 

ConfigParser library module 

connect 

ConnectRegistry 

constants, defining 

constructors  2nd 

    use in debugging 

_ _contains_ _ 

containsAll 

containsAny 

ContentHandler 

    subclasses 

    subclassing 

    text, extracting from XML documents 

convex hull of a set of 2D points, finding 

cookies

    Cookie and CookieInfo classes 

    cookie information, accessing in Netscape 

    finding on Internet Explorer 

_ _copy_ _ 

copy-and-paste coding 

copy.copy 

copying objects 

CORBA 

    client and server implementation 

    RPCs, contrasted with 

count (string object methods) 

counts method 

cPickle module  2nd 

    binary vs. text format 

    classes and instances, using on 

    data serialization using 

    dump vs. dumps 

    Python version compatibility 

cPickle.dumps 

CreateMutex 

cStringIO module 

CSV (comma-separated values) files

    conversion to XML 

    parsing 

curry function 

Curry, Haskell 

currying 

    lexically nested scopes, and 

cursor 

cursor's description attribute, using for display formatting 

custom metaclasses 

cwd 

CXX 

Категории