11 KiB
11 KiB
1 | c-api/arg | :ref | PyArg_ParseTuple(args, "O|O:ref", &object, &callback) | |
---|---|---|---|---|
2 | c-api/list | :high | list[low:high] | |
3 | c-api/list | :high | list[low:high] = itemlist | |
4 | c-api/sequence | :i2 | o[i1:i2] | |
5 | c-api/sequence | :i2 | o[i1:i2] = v | |
6 | c-api/sequence | :i2 | del o[i1:i2] | |
7 | c-api/unicode | :end | str[start:end] | |
8 | distutils/setupscript | :: | ||
9 | extending/embedding | :numargs | if(!PyArg_ParseTuple(args, ":numargs")) | |
10 | extending/extending | :set | if (PyArg_ParseTuple(args, "O:set_callback", &temp)) { | |
11 | extending/extending | :myfunction | PyArg_ParseTuple(args, "D:myfunction", &c); | |
12 | extending/newtypes | :call | if (!PyArg_ParseTuple(args, "sss:call", &arg1, &arg2, &arg3)) { | |
13 | extending/windows | :initspam | /export:initspam | |
14 | howto/cporting | :add | if (!PyArg_ParseTuple(args, "ii:add_ints", &one, &two)) | |
15 | howto/cporting | :encode | if (!PyArg_ParseTuple(args, "O:encode_object", &myobj)) | |
16 | howto/cporting | :say | if (!PyArg_ParseTuple(args, "U:say_hello", &name)) | |
17 | howto/curses | :black | They are: 0:black, 1:red, 2:green, 3:yellow, 4:blue, 5:magenta, 6:cyan, and | |
18 | howto/curses | :blue | They are: 0:black, 1:red, 2:green, 3:yellow, 4:blue, 5:magenta, 6:cyan, and | |
19 | howto/curses | :cyan | They are: 0:black, 1:red, 2:green, 3:yellow, 4:blue, 5:magenta, 6:cyan, and | |
20 | howto/curses | :green | They are: 0:black, 1:red, 2:green, 3:yellow, 4:blue, 5:magenta, 6:cyan, and | |
21 | howto/curses | :magenta | They are: 0:black, 1:red, 2:green, 3:yellow, 4:blue, 5:magenta, 6:cyan, and | |
22 | howto/curses | :red | They are: 0:black, 1:red, 2:green, 3:yellow, 4:blue, 5:magenta, 6:cyan, and | |
23 | howto/curses | :white | 7:white. | |
24 | howto/curses | :yellow | They are: 0:black, 1:red, 2:green, 3:yellow, 4:blue, 5:magenta, 6:cyan, and | |
25 | howto/regex | :: | ||
26 | howto/regex | :foo | (?:foo) | |
27 | howto/urllib2 | :example | for example "joe@password:example.com" | |
28 | howto/webservers | .. image: | .. image:: http.png | |
29 | library/audioop | :ipos | # factor = audioop.findfactor(in_test[ipos*2:ipos*2+len(out_test)], | |
30 | library/datetime | :MM | ||
31 | library/datetime | :SS | ||
32 | library/decimal | :optional | trailneg:optional trailing minus indicator | |
33 | library/difflib | :ahi | a[alo:ahi] | |
34 | library/difflib | :bhi | b[blo:bhi] | |
35 | library/difflib | :i2 | ||
36 | library/difflib | :j2 | ||
37 | library/difflib | :i1 | ||
38 | library/dis | :TOS | ||
39 | library/dis | ` | TOS = `TOS` | |
40 | library/doctest | ` | ``factorial`` from the ``example`` module: | |
41 | library/doctest | ` | The ``example`` module | |
42 | library/doctest | ` | Using ``factorial`` | |
43 | library/functions | :step | a[start:stop:step] | |
44 | library/functions | :stop | a[start:stop, i] | |
45 | library/functions | :stop | a[start:stop:step] | |
46 | library/hotshot | :lineno | ncalls tottime percall cumtime percall filename:lineno(function) | |
47 | library/httplib | :port | host:port | |
48 | library/imaplib | :MM | "DD-Mmm-YYYY HH:MM:SS +HHMM" | |
49 | library/imaplib | :SS | "DD-Mmm-YYYY HH:MM:SS +HHMM" | |
50 | library/itertools | :stop | elements from seq[start:stop:step] | |
51 | library/itertools | :step | elements from seq[start:stop:step] | |
52 | library/linecache | :sys | sys:x:3:3:sys:/dev:/bin/sh | |
53 | library/logging | :And | ||
54 | library/logging | :package1 | ||
55 | library/logging | :package2 | ||
56 | library/logging | :root | ||
57 | library/logging | :This | ||
58 | library/logging | :port | host:port | |
59 | library/mmap | :i2 | obj[i1:i2] | |
60 | library/multiprocessing | :queue | >>> QueueManager.register('get_queue', callable=lambda:queue) | |
61 | library/multiprocessing | ` | >>> l._callmethod('__getitem__', (20,)) # equiv to `l[20]` | |
62 | library/multiprocessing | ` | >>> l._callmethod('__getslice__', (2, 7)) # equiv to `l[2:7]` | |
63 | library/multiprocessing | ` | # `BaseManager`. | |
64 | library/multiprocessing | ` | # `Pool.imap()` (which will save on the amount of code needed anyway). | |
65 | library/multiprocessing | ` | # A test file for the `multiprocessing` package | |
66 | library/multiprocessing | ` | # A test of `multiprocessing.Pool` class | |
67 | library/multiprocessing | ` | # Add more tasks using `put()` | |
68 | library/multiprocessing | ` | # create server for a `HostManager` object | |
69 | library/multiprocessing | ` | # Depends on `multiprocessing` package -- tested with `processing-0.60` | |
70 | library/multiprocessing | ` | # in the original order then consider using `Pool.map()` or | |
71 | library/multiprocessing | ` | # Not sure if we should synchronize access to `socket.accept()` method by | |
72 | library/multiprocessing | ` | # object. (We import `multiprocessing.reduction` to enable this pickling.) | |
73 | library/multiprocessing | ` | # register the Foo class; make `f()` and `g()` accessible via proxy | |
74 | library/multiprocessing | ` | # register the Foo class; make `g()` and `_h()` accessible via proxy | |
75 | library/multiprocessing | ` | # register the generator function baz; use `GeneratorProxy` to make proxies | |
76 | library/multiprocessing | ` | `Cluster` is a subclass of `SyncManager` so it allows creation of | |
77 | library/multiprocessing | ` | `hostname` gives the name of the host. If hostname is not | |
78 | library/multiprocessing | ` | `slots` is used to specify the number of slots for processes on | |
79 | library/optparse | :len | del parser.rargs[:len(value)] | |
80 | library/os.path | :foo | c:foo | |
81 | library/parser | ` | "Make a function that raises an argument to the exponent `exp`." | |
82 | library/posix | ` | CFLAGS="`getconf LFS_CFLAGS`" OPT="-g -O2 $CFLAGS" | |
83 | library/profile | :lineno | ncalls tottime percall cumtime percall filename:lineno(function) | |
84 | library/profile | :lineno | filename:lineno(function) | |
85 | library/pyexpat | :elem1 | <py:elem1 /> | |
86 | library/pyexpat | :py | xmlns:py = "http://www.python.org/ns/"> | |
87 | library/repr | ` | return `obj` | |
88 | library/smtplib | :port | as well as a regular host:port server. | |
89 | library/socket | :: | '5aef:2b::8' | |
90 | library/sqlite3 | :memory | ||
91 | library/sqlite3 | :age | select name_last, age from people where name_last=:who and age=:age | |
92 | library/sqlite3 | :who | select name_last, age from people where name_last=:who and age=:age | |
93 | library/ssl | :My | Organization Name (eg, company) [Internet Widgits Pty Ltd]:My Organization, Inc. | |
94 | library/ssl | :My | Organizational Unit Name (eg, section) []:My Group | |
95 | library/ssl | :myserver | Common Name (eg, YOUR name) []:myserver.mygroup.myorganization.com | |
96 | library/ssl | :MyState | State or Province Name (full name) [Some-State]:MyState | |
97 | library/ssl | :ops | Email Address []:ops@myserver.mygroup.myorganization.com | |
98 | library/ssl | :Some | Locality Name (eg, city) []:Some City | |
99 | library/ssl | :US | Country Name (2 letter code) [AU]:US | |
100 | library/stdtypes | :len | s[len(s):len(s)] | |
101 | library/stdtypes | :len | s[len(s):len(s)] | |
102 | library/string | :end | s[start:end] | |
103 | library/string | :end | s[start:end] | |
104 | library/subprocess | ` | output=`mycmd myarg` | |
105 | library/subprocess | ` | output=`dmesg | grep hda` | |
106 | library/tarfile | :compression | filemode[:compression] | |
107 | library/tarfile | :gz | ||
108 | library/tarfile | :bz2 | ||
109 | library/time | :mm | ||
110 | library/time | :ss | ||
111 | library/turtle | :: | Example:: | |
112 | library/urllib | :port | :port | |
113 | library/urllib2 | :password | "joe:password@python.org" | |
114 | library/uuid | :uuid | urn:uuid:12345678-1234-5678-1234-567812345678 | |
115 | library/xmlrpclib | :pass | http://user:pass@host:port/path | |
116 | library/xmlrpclib | :pass | user:pass | |
117 | library/xmlrpclib | :port | http://user:pass@host:port/path | |
118 | license | ` | THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND | |
119 | license | :zooko | mailto:zooko@zooko.com | |
120 | license | ` | THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND | |
121 | reference/datamodel | :step | a[i:j:step] | |
122 | reference/datamodel | :max | ||
123 | reference/expressions | :index | x[index:index] | |
124 | reference/expressions | :datum | {key:datum...} | |
125 | reference/expressions | ` | `expressions...` | |
126 | reference/grammar | :output | #diagram:output | |
127 | reference/grammar | :rules | #diagram:rules | |
128 | reference/grammar | :token | #diagram:token | |
129 | reference/grammar | ` | '`' testlist1 '`' | |
130 | reference/lexical_analysis | :fileencoding | # vim:fileencoding=<encoding-name> | |
131 | reference/lexical_analysis | ` | , : . ` = ; | |
132 | tutorial/datastructures | :value | key:value pairs within the braces adds initial key:value pairs | |
133 | tutorial/datastructures | :value | It is also possible to delete a key:value | |
134 | tutorial/stdlib2 | :start | fields = struct.unpack('<IIIHH', data[start:start+16]) | |
135 | tutorial/stdlib2 | :start | extra = data[start:start+extra_size] | |
136 | tutorial/stdlib2 | :start | filename = data[start:start+filenamesize] | |
137 | tutorial/stdlib2 | :config | logging.warning('Warning:config file %s not found', 'server.conf') | |
138 | tutorial/stdlib2 | :config | WARNING:root:Warning:config file server.conf not found | |
139 | tutorial/stdlib2 | :Critical | CRITICAL:root:Critical error -- shutting down | |
140 | tutorial/stdlib2 | :Error | ERROR:root:Error occurred | |
141 | tutorial/stdlib2 | :root | CRITICAL:root:Critical error -- shutting down | |
142 | tutorial/stdlib2 | :root | ERROR:root:Error occurred | |
143 | tutorial/stdlib2 | :root | WARNING:root:Warning:config file server.conf not found | |
144 | tutorial/stdlib2 | :Warning | WARNING:root:Warning:config file server.conf not found | |
145 | using/cmdline | :line | file:line: category: message | |
146 | using/cmdline | :category | action:message:category:module:line | |
147 | using/cmdline | :line | action:message:category:module:line | |
148 | using/cmdline | :message | action:message:category:module:line | |
149 | using/cmdline | :module | action:message:category:module:line | |
150 | using/cmdline | :errorhandler | :errorhandler | |
151 | using/windows | 162 | ` | `` this fixes syntax highlighting errors in some editors due to the \\\\ hackery |
152 | using/windows | 170 | ` | `` |
153 | whatsnew/2.0 | 418 | :len | |
154 | whatsnew/2.3 | :: | ||
155 | whatsnew/2.3 | :config | ||
156 | whatsnew/2.3 | :Critical | ||
157 | whatsnew/2.3 | :Error | ||
158 | whatsnew/2.3 | :Problem | ||
159 | whatsnew/2.3 | :root | ||
160 | whatsnew/2.3 | :Warning | ||
161 | whatsnew/2.4 | :: | ||
162 | whatsnew/2.4 | :System | ||
163 | whatsnew/2.5 | :memory | :memory: | |
164 | whatsnew/2.5 | :step | [start:stop:step] | |
165 | whatsnew/2.5 | :stop | [start:stop:step] | |
166 | distutils/examples | 267 | ` | This is the description of the ``foobar`` package. |
167 | faq/programming | :reduce | print (lambda Ru,Ro,Iu,Io,IM,Sx,Sy:reduce(lambda x,y:x+y,map(lambda y, | |
168 | faq/programming | :reduce | Sx=Sx,Sy=Sy:reduce(lambda x,y:x+y,map(lambda x,xc=Ru,yc=yc,Ru=Ru,Ro=Ro, | |
169 | faq/programming | :chr | >=4.0) or 1+f(xc,yc,x*x-y*y+xc,2.0*x*y+yc,k-1,f):f(xc,yc,x,y,k,f):chr( | |
170 | faq/programming | :: | for x in sequence[::-1]: | |
171 | faq/windows | 229 | :EOF | @setlocal enableextensions & python -x %~f0 %* & goto :EOF |
172 | faq/windows | 393 | :REG | .py :REG_SZ: c:\<path to python>\python.exe -u %s %s |
173 | library/bisect | :hi | all(val >= x for val in a[i:hi]) | |
174 | library/bisect | :hi | all(val > x for val in a[i:hi]) | |
175 | library/http.client | 52 | :port | host:port |
176 | library/nntplib | :bytes | :bytes | |
177 | library/nntplib | :lines | :lines | |
178 | library/nntplib | :lines | ['xref', 'from', ':lines', ':bytes', 'references', 'date', 'message-id', 'subject'] | |
179 | library/nntplib | :bytes | ['xref', 'from', ':lines', ':bytes', 'references', 'date', 'message-id', 'subject'] | |
180 | library/pickle | 567 | :memory | conn = sqlite3.connect(":memory:") |
181 | library/profile | 293 | :lineno | (sort by filename:lineno), |
182 | library/socket | :: | (10, 1, 6, '', ('2001:888:2000:d::a2', 80, 0, 0))] | |
183 | library/stdtypes | :end | s[start:end] | |
184 | library/stdtypes | :end | s[start:end] | |
185 | license | ` | * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY | |
186 | license | ` | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND | |
187 | license | ` | ``Software''), to deal in the Software without restriction, including | |
188 | license | ` | THE SOFTWARE IS PROVIDED ``AS IS'', WITHOUT WARRANTY OF ANY KIND, | |
189 | reference/lexical_analysis | 704 | ` | $ ? ` |
190 | whatsnew/2.7 | 735 | :Sunday | '2009:4:Sunday' |
191 | whatsnew/2.7 | 862 | :: | export PYTHONWARNINGS=all,error:::Cookie:0 |
192 | whatsnew/2.7 | 862 | :Cookie | export PYTHONWARNINGS=all,error:::Cookie:0 |
193 | whatsnew/2.7 | :: | >>> urlparse.urlparse('http://[1080::8:800:200C:417A]/foo') | |
194 | whatsnew/2.7 | :: | ParseResult(scheme='http', netloc='[1080::8:800:200C:417A]', | |
195 | howto/pyporting | 75 | :: | # make sure to use :: Python *and* :: Python :: 3 so |
196 | howto/pyporting | 75 | :: | 'Programming Language :: Python', |
197 | howto/pyporting | 75 | :: | 'Programming Language :: Python :: 3' |
198 | library/urllib2 | 67 | :close | Connection:close |