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/sequence | :i2 | o[i1:i2] | |
4 | c-api/unicode | :end | str[start:end] | |
5 | distutils/setupscript | :: | ||
6 | extending/embedding | :numargs | if(!PyArg_ParseTuple(args, ":numargs")) | |
7 | extending/extending | :set | if (PyArg_ParseTuple(args, "O:set_callback", &temp)) { | |
8 | extending/extending | :myfunction | PyArg_ParseTuple(args, "D:myfunction", &c); | |
9 | extending/newtypes | :call | if (!PyArg_ParseTuple(args, "sss:call", &arg1, &arg2, &arg3)) { | |
10 | faq/programming | :reduce | print (lambda Ru,Ro,Iu,Io,IM,Sx,Sy:reduce(lambda x,y:x+y,map(lambda y, | |
11 | faq/programming | :reduce | Sx=Sx,Sy=Sy:reduce(lambda x,y:x+y,map(lambda x,xc=Ru,yc=yc,Ru=Ru,Ro=Ro, | |
12 | 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( | |
13 | faq/programming | :: | for x in sequence[::-1]: | |
14 | howto/cporting | :encode | if (!PyArg_ParseTuple(args, "O:encode_object", &myobj)) | |
15 | howto/cporting | :say | if (!PyArg_ParseTuple(args, "U:say_hello", &name)) | |
16 | howto/curses | :black | They are: 0:black, 1:red, 2:green, 3:yellow, 4:blue, 5:magenta, 6:cyan, and | |
17 | howto/curses | :blue | They are: 0:black, 1:red, 2:green, 3:yellow, 4:blue, 5:magenta, 6:cyan, and | |
18 | howto/curses | :cyan | They are: 0:black, 1:red, 2:green, 3:yellow, 4:blue, 5:magenta, 6:cyan, and | |
19 | howto/curses | :green | They are: 0:black, 1:red, 2:green, 3:yellow, 4:blue, 5:magenta, 6:cyan, and | |
20 | howto/curses | :magenta | They are: 0:black, 1:red, 2:green, 3:yellow, 4:blue, 5:magenta, 6:cyan, and | |
21 | howto/curses | :red | They are: 0:black, 1:red, 2:green, 3:yellow, 4:blue, 5:magenta, 6:cyan, and | |
22 | howto/curses | :white | 7:white. | |
23 | howto/curses | :yellow | They are: 0:black, 1:red, 2:green, 3:yellow, 4:blue, 5:magenta, 6:cyan, and | |
24 | howto/logging | :root | WARNING:root:Watch out! | |
25 | howto/logging | :Watch | WARNING:root:Watch out! | |
26 | howto/logging | :root | DEBUG:root:This message should go to the log file | |
27 | howto/logging | :root | INFO:root:So should this | |
28 | howto/logging | :So | INFO:root:So should this | |
29 | howto/logging | :root | WARNING:root:And this, too | |
30 | howto/logging | :And | WARNING:root:And this, too | |
31 | howto/logging | :root | INFO:root:Started | |
32 | howto/logging | :Started | INFO:root:Started | |
33 | howto/logging | :root | INFO:root:Doing something | |
34 | howto/logging | :Doing | INFO:root:Doing something | |
35 | howto/logging | :root | INFO:root:Finished | |
36 | howto/logging | :Finished | INFO:root:Finished | |
37 | howto/logging | :root | WARNING:root:Look before you leap! | |
38 | howto/logging | :Look | WARNING:root:Look before you leap! | |
39 | howto/logging | :This | DEBUG:This message should appear on the console | |
40 | howto/logging | :So | INFO:So should this | |
41 | howto/logging | :And | WARNING:And this, too | |
42 | howto/logging | :logger | severity:logger name:message | |
43 | howto/logging | :message | severity:logger name:message | |
44 | howto/logging | :This | DEBUG:root:This message should go to the log file | |
45 | howto/pyporting | :: | Programming Language :: Python :: 2 | |
46 | howto/pyporting | :: | Programming Language :: Python :: 3 | |
47 | howto/regex | :: | ||
48 | howto/regex | :foo | (?:foo) | |
49 | howto/urllib2 | :password | for example "joe:password@example.com" | |
50 | library/audioop | :ipos | # factor = audioop.findfactor(in_test[ipos*2:ipos*2+len(out_test)], | |
51 | library/bisect | :hi | all(val >= x for val in a[i:hi]) | |
52 | library/bisect | :hi | all(val > x for val in a[i:hi]) | |
53 | library/cookie | ` | !#$%&'*+-.^_`|~ | |
54 | library/datetime | :MM | ||
55 | library/datetime | :SS | ||
56 | library/decimal | :optional | trailneg:optional trailing minus indicator | |
57 | library/difflib | :ahi | a[alo:ahi] | |
58 | library/difflib | :bhi | b[blo:bhi] | |
59 | library/difflib | :i2 | ||
60 | library/difflib | :j2 | ||
61 | library/difflib | :i1 | ||
62 | library/dis | :TOS | ||
63 | library/dis | ` | TOS = `TOS` | |
64 | library/doctest | ` | ``factorial`` from the ``example`` module: | |
65 | library/doctest | ` | The ``example`` module | |
66 | library/doctest | ` | Using ``factorial`` | |
67 | library/exceptions | :err | err.object[err.start:err.end] | |
68 | library/functions | :step | a[start:stop:step] | |
69 | library/functions | :stop | a[start:stop, i] | |
70 | library/functions | :stop | a[start:stop:step] | |
71 | library/hotshot | :lineno | ncalls tottime percall cumtime percall filename:lineno(function) | |
72 | library/httplib | :port | host:port | |
73 | library/imaplib | :MM | "DD-Mmm-YYYY HH:MM:SS | |
74 | library/imaplib | :SS | "DD-Mmm-YYYY HH:MM:SS | |
75 | library/itertools | :stop | elements from seq[start:stop:step] | |
76 | library/itertools | :step | elements from seq[start:stop:step] | |
77 | library/linecache | :sys | sys:x:3:3:sys:/dev:/bin/sh | |
78 | library/logging.handlers | :port | host:port | |
79 | library/mmap | :i2 | obj[i1:i2] | |
80 | library/multiprocessing | :queue | >>> QueueManager.register('get_queue', callable=lambda:queue) | |
81 | library/multiprocessing | ` | >>> l._callmethod('__getitem__', (20,)) # equiv to `l[20]` | |
82 | library/multiprocessing | ` | >>> l._callmethod('__getslice__', (2, 7)) # equiv to `l[2:7]` | |
83 | library/multiprocessing | ` | # `BaseManager`. | |
84 | library/multiprocessing | ` | # `Pool.imap()` (which will save on the amount of code needed anyway). | |
85 | library/multiprocessing | ` | # A test file for the `multiprocessing` package | |
86 | library/multiprocessing | ` | # A test of `multiprocessing.Pool` class | |
87 | library/multiprocessing | ` | # Add more tasks using `put()` | |
88 | library/multiprocessing | ` | # in the original order then consider using `Pool.map()` or | |
89 | library/multiprocessing | ` | # Not sure if we should synchronize access to `socket.accept()` method by | |
90 | library/multiprocessing | ` | # object. (We import `multiprocessing.reduction` to enable this pickling.) | |
91 | library/multiprocessing | ` | # register the Foo class; make `f()` and `g()` accessible via proxy | |
92 | library/multiprocessing | ` | # register the Foo class; make `g()` and `_h()` accessible via proxy | |
93 | library/multiprocessing | ` | # register the generator function baz; use `GeneratorProxy` to make proxies | |
94 | library/optparse | :len | del parser.rargs[:len(value)] | |
95 | library/os.path | :foo | c:foo | |
96 | library/pdb | :lineno | filename:lineno | |
97 | library/posix | ` | CFLAGS="`getconf LFS_CFLAGS`" OPT="-g -O2 $CFLAGS" | |
98 | library/profile | :lineno | ncalls tottime percall cumtime percall filename:lineno(function) | |
99 | library/profile | :lineno | filename:lineno(function) | |
100 | library/pyexpat | :elem1 | <py:elem1 /> | |
101 | library/pyexpat | :py | xmlns:py = "http://www.python.org/ns/"> | |
102 | library/smtplib | :port | method must support that as well as a regular host:port | |
103 | library/socket | :: | '5aef:2b::8' | |
104 | library/sqlite3 | :memory | ||
105 | library/sqlite3 | :who | cur.execute("select * from people where name_last=:who and age=:age", {"who": who, "age": age}) | |
106 | library/sqlite3 | :age | cur.execute("select * from people where name_last=:who and age=:age", {"who": who, "age": age}) | |
107 | library/ssl | :My | Organization Name (eg, company) [Internet Widgits Pty Ltd]:My Organization, Inc. | |
108 | library/ssl | :My | Organizational Unit Name (eg, section) []:My Group | |
109 | library/ssl | :myserver | Common Name (eg, YOUR name) []:myserver.mygroup.myorganization.com | |
110 | library/ssl | :MyState | State or Province Name (full name) [Some-State]:MyState | |
111 | library/ssl | :ops | Email Address []:ops@myserver.mygroup.myorganization.com | |
112 | library/ssl | :Some | Locality Name (eg, city) []:Some City | |
113 | library/ssl | :US | Country Name (2 letter code) [AU]:US | |
114 | library/stdtypes | :len | s[len(s):len(s)] | |
115 | library/stdtypes | :end | s[start:end] | |
116 | library/string | :end | s[start:end] | |
117 | library/subprocess | ` | output=`mycmd myarg` | |
118 | library/subprocess | ` | output=`dmesg | grep hda` | |
119 | library/tarfile | :compression | filemode[:compression] | |
120 | library/tarfile | :gz | ||
121 | library/tarfile | :bz2 | ||
122 | library/time | :mm | ||
123 | library/time | :ss | ||
124 | library/turtle | :: | Example:: | |
125 | library/urllib | :port | :port | |
126 | library/urllib2 | :password | "joe:password@python.org" | |
127 | library/urllib2 | :close | Connection:close | |
128 | library/uuid | :uuid | urn:uuid:12345678-1234-5678-1234-567812345678 | |
129 | library/xml.etree.elementtree | :sometag | prefix:sometag | |
130 | library/xml.etree.elementtree | :fictional | <actors xmlns:fictional="http://characters.example.com" | |
131 | library/xml.etree.elementtree | :character | <fictional:character>Lancelot</fictional:character> | |
132 | library/xml.etree.elementtree | :character | <fictional:character>Archie Leach</fictional:character> | |
133 | library/xml.etree.elementtree | :character | <fictional:character>Sir Robin</fictional:character> | |
134 | library/xml.etree.elementtree | :character | <fictional:character>Gunther</fictional:character> | |
135 | library/xml.etree.elementtree | :character | <fictional:character>Commander Clement</fictional:character> | |
136 | library/xml.etree.elementtree | :actor | for actor in root.findall('real_person:actor', ns): | |
137 | library/xml.etree.elementtree | :name | name = actor.find('real_person:name', ns) | |
138 | library/xml.etree.elementtree | :character | for char in actor.findall('role:character', ns): | |
139 | library/xmlrpclib | :pass | http://user:pass@host:port/path | |
140 | library/xmlrpclib | :pass | user:pass | |
141 | library/xmlrpclib | :port | http://user:pass@host:port/path | |
142 | license | ` | THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND | |
143 | license | :zooko | mailto:zooko@zooko.com | |
144 | license | ` | THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND | |
145 | license | ` | * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY | |
146 | license | ` | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND | |
147 | license | ` | ``Software''), to deal in the Software without restriction, including | |
148 | license | ` | THE SOFTWARE IS PROVIDED ``AS IS'', WITHOUT WARRANTY OF ANY KIND, | |
149 | reference/datamodel | :step | a[i:j:step] | |
150 | reference/datamodel | :max | ||
151 | reference/expressions | :index | x[index:index] | |
152 | reference/expressions | ` | `expressions...` | |
153 | reference/expressions | ` | "`" | |
154 | reference/grammar | ` | '`' testlist1 '`' | |
155 | reference/lexical_analysis | :fileencoding | # vim:fileencoding=<encoding-name> | |
156 | reference/lexical_analysis | ` | , : . ` = ; | |
157 | tutorial/datastructures | :value | key:value pairs within the braces adds initial key:value pairs | |
158 | tutorial/datastructures | :value | It is also possible to delete a key:value | |
159 | tutorial/stdlib2 | :start | fields = struct.unpack('<IIIHH', data[start:start+16]) | |
160 | tutorial/stdlib2 | :start | extra = data[start:start+extra_size] | |
161 | tutorial/stdlib2 | :start | filename = data[start:start+filenamesize] | |
162 | tutorial/stdlib2 | :config | logging.warning('Warning:config file %s not found', 'server.conf') | |
163 | tutorial/stdlib2 | :config | WARNING:root:Warning:config file server.conf not found | |
164 | tutorial/stdlib2 | :Critical | CRITICAL:root:Critical error -- shutting down | |
165 | tutorial/stdlib2 | :Error | ERROR:root:Error occurred | |
166 | tutorial/stdlib2 | :root | CRITICAL:root:Critical error -- shutting down | |
167 | tutorial/stdlib2 | :root | ERROR:root:Error occurred | |
168 | tutorial/stdlib2 | :root | WARNING:root:Warning:config file server.conf not found | |
169 | tutorial/stdlib2 | :Warning | WARNING:root:Warning:config file server.conf not found | |
170 | using/cmdline | :line | file:line: category: message | |
171 | using/cmdline | :category | action:message:category:module:line | |
172 | using/cmdline | :line | action:message:category:module:line | |
173 | using/cmdline | :message | action:message:category:module:line | |
174 | using/cmdline | :module | action:message:category:module:line | |
175 | using/cmdline | :errorhandler | :errorhandler | |
176 | using/unix | :Packaging | http://en.opensuse.org/Portal:Packaging | |
177 | whatsnew/2.0 | 418 | :len | |
178 | whatsnew/2.3 | :: | ||
179 | whatsnew/2.3 | :config | ||
180 | whatsnew/2.3 | :Critical | ||
181 | whatsnew/2.3 | :Error | ||
182 | whatsnew/2.3 | :Problem | ||
183 | whatsnew/2.3 | :root | ||
184 | whatsnew/2.3 | :Warning | ||
185 | whatsnew/2.4 | :: | ||
186 | whatsnew/2.4 | :System | ||
187 | whatsnew/2.5 | :memory | :memory: | |
188 | whatsnew/2.5 | :step | [start:stop:step] | |
189 | whatsnew/2.5 | :stop | [start:stop:step] | |
190 | whatsnew/2.7 | :Sunday | '2009:4:Sunday' | |
191 | whatsnew/2.7 | :: | export PYTHONWARNINGS=all,error:::Cookie:0 | |
192 | whatsnew/2.7 | :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]', |