Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 533281d

Browse files
committed
merge heads
2 parents a8755c5 + d34fc8b commit 533281d

10 files changed

Lines changed: 362 additions & 8 deletions

File tree

Doc/conf.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,12 @@
6565
# Options for HTML output
6666
# -----------------------
6767

68-
html_theme = 'default'
68+
html_theme = 'pydoctheme'
69+
html_theme_path = ['tools/sphinxext']
6970
html_theme_options = {'collapsiblesidebar': True}
7071

72+
html_short_title = '%s Documentation' % release
73+
7174
# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
7275
# using the given strftime format.
7376
html_last_updated_fmt = '%b %d, %Y'

Doc/howto/cporting.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ behave slightly differently from real Capsules. Specifically:
257257
returns failure. (Since there's no way to store a name
258258
in a CObject, noisy failure of :c:func:`PyCapsule_SetName`
259259
was deemed preferable to silent failure here. If this is
260-
inconveient, feel free to modify your local
260+
inconvenient, feel free to modify your local
261261
copy as you see fit.)
262262

263263
You can find :file:`capsulethunk.h` in the Python source distribution

Doc/howto/curses.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ function to restore the terminal to its original operating mode. ::
118118
A common problem when debugging a curses application is to get your terminal
119119
messed up when the application dies without restoring the terminal to its
120120
previous state. In Python this commonly happens when your code is buggy and
121-
raises an uncaught exception. Keys are no longer be echoed to the screen when
121+
raises an uncaught exception. Keys are no longer echoed to the screen when
122122
you type them, for example, which makes using the shell difficult.
123123

124124
In Python you can avoid these complications and make debugging much easier by
@@ -271,7 +271,7 @@ application are commonly shown in reverse video; a text viewer may need to
271271
highlight certain words. curses supports this by allowing you to specify an
272272
attribute for each cell on the screen.
273273

274-
An attribute is a integer, each bit representing a different attribute. You can
274+
An attribute is an integer, each bit representing a different attribute. You can
275275
try to display text with multiple attribute bits set, but curses doesn't
276276
guarantee that all the possible combinations are available, or that they're all
277277
visually distinct. That depends on the ability of the terminal being used, so
@@ -300,7 +300,7 @@ could code::
300300
curses.A_REVERSE)
301301
stdscr.refresh()
302302

303-
The curses library also supports color on those terminals that provide it, The
303+
The curses library also supports color on those terminals that provide it. The
304304
most common such terminal is probably the Linux console, followed by color
305305
xterms.
306306

Doc/tools/sphinxext/layout.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
{% block rootrellink %}
33
<li><img src="{{ pathto('_static/py.png', 1) }}" alt=""
44
style="vertical-align: middle; margin-top: -1px"/></li>
5+
<li><a href="http://www.python.org/">Python</a>{{ reldelim1 }}</li>
56
<li><a href="{{ pathto('index') }}">{{ shorttitle }}</a>{{ reldelim1 }}</li>
67
{% endblock %}
78
{% block extrahead %}
Lines changed: 170 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,170 @@
1+
@import url("default.css");
2+
3+
body {
4+
background-color: white;
5+
margin-left: 1em;
6+
margin-right: 1em;
7+
}
8+
9+
div.related {
10+
margin-bottom: 1.2em;
11+
padding: 0.5em 0;
12+
border-top: 1px solid #ccc;
13+
margin-top: 0.5em;
14+
}
15+
16+
div.related a:hover {
17+
color: #0095C4;
18+
}
19+
20+
div.related:first-child {
21+
border-top: 0;
22+
border-bottom: 1px solid #ccc;
23+
}
24+
25+
div.sphinxsidebar {
26+
background-color: #eeeeee;
27+
border-radius: 5px;
28+
line-height: 130%;
29+
font-size: smaller;
30+
}
31+
32+
div.sphinxsidebar h3, div.sphinxsidebar h4 {
33+
margin-top: 1.5em;
34+
}
35+
36+
div.sphinxsidebarwrapper > h3:first-child {
37+
margin-top: 0.2em;
38+
}
39+
40+
div.sphinxsidebarwrapper > ul > li > ul > li {
41+
margin-bottom: 0.4em;
42+
}
43+
44+
div.sphinxsidebar a:hover {
45+
color: #0095C4;
46+
}
47+
48+
div.sphinxsidebar input {
49+
font-family: 'Lucida Grande',Arial,sans-serif;
50+
border: 1px solid #999999;
51+
font-size: smaller;
52+
border-radius: 3px;
53+
}
54+
55+
div.sphinxsidebar input[type=text] {
56+
max-width: 150px;
57+
}
58+
59+
div.body {
60+
padding: 0 0 0 1.2em;
61+
}
62+
63+
div.body p {
64+
line-height: 140%;
65+
}
66+
67+
div.body h1, div.body h2, div.body h3, div.body h4, div.body h5, div.body h6 {
68+
margin: 0;
69+
border: 0;
70+
padding: 0.3em 0;
71+
}
72+
73+
div.body hr {
74+
border: 0;
75+
background-color: #ccc;
76+
height: 1px;
77+
}
78+
79+
div.body pre {
80+
border-radius: 3px;
81+
border: 1px solid #ac9;
82+
}
83+
84+
div.body div.admonition, div.body div.impl-detail {
85+
border-radius: 3px;
86+
}
87+
88+
div.body div.impl-detail > p {
89+
margin: 0;
90+
}
91+
92+
div.body div.seealso {
93+
border: 1px solid #dddd66;
94+
}
95+
96+
div.body a {
97+
color: #00608f;
98+
}
99+
100+
div.body a:visited {
101+
color: #30306f;
102+
}
103+
104+
div.body a:hover {
105+
color: #00B0E4;
106+
}
107+
108+
tt, pre {
109+
font-family: monospace, sans-serif;
110+
font-size: 96.5%;
111+
}
112+
113+
div.body tt {
114+
border-radius: 3px;
115+
}
116+
117+
div.body tt.descname {
118+
font-size: 120%;
119+
}
120+
121+
div.body tt.xref, div.body a tt {
122+
font-weight: normal;
123+
}
124+
125+
p.deprecated {
126+
border-radius: 3px;
127+
}
128+
129+
table.docutils {
130+
border: 1px solid #ddd;
131+
min-width: 20%;
132+
border-radius: 3px;
133+
margin-top: 10px;
134+
margin-bottom: 10px;
135+
}
136+
137+
table.docutils td, table.docutils th {
138+
border: 1px solid #ddd !important;
139+
border-radius: 3px;
140+
}
141+
142+
table p, table li {
143+
text-align: left !important;
144+
}
145+
146+
table.docutils th {
147+
background-color: #eee;
148+
padding: 0.3em 0.5em;
149+
}
150+
151+
table.docutils td {
152+
background-color: white;
153+
padding: 0.3em 0.5em;
154+
}
155+
156+
table.footnote, table.footnote td {
157+
border: 0 !important;
158+
}
159+
160+
div.footer {
161+
line-height: 150%;
162+
margin-top: -2em;
163+
text-align: right;
164+
width: auto;
165+
margin-right: 10px;
166+
}
167+
168+
div.footer a:hover {
169+
color: #0095C4;
170+
}
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
[theme]
2+
inherit = default
3+
stylesheet = pydoctheme.css
4+
pygments_style = sphinx
5+
6+
[options]
7+
bodyfont = 'Lucida Grande', Arial, sans-serif
8+
headfont = 'Lucida Grande', Arial, sans-serif
9+
footerbgcolor = white
10+
footertextcolor = #555555
11+
relbarbgcolor = white
12+
relbartextcolor = #666666
13+
relbarlinkcolor = #444444
14+
sidebarbgcolor = white
15+
sidebartextcolor = #444444
16+
sidebarlinkcolor = #444444
17+
bgcolor = white
18+
textcolor = #222222
19+
linkcolor = #0090c0
20+
visitedlinkcolor = #00608f
21+
headtextcolor = #1a1a1a
22+
headbgcolor = white
23+
headlinkcolor = #aaaaaa

Doc/tools/sphinxext/pyspecific.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,10 @@ def new_visit_versionmodified(self, node):
2727
self.body.append(self.starttag(node, 'p', CLASS=node['type']))
2828
text = versionlabels[node['type']] % node['version']
2929
if len(node):
30-
text += ': '
30+
text += ':'
3131
else:
3232
text += '.'
33-
self.body.append('<span class="versionmodified">%s</span>' % text)
33+
self.body.append('<span class="versionmodified">%s</span> ' % text)
3434

3535
from sphinx.writers.html import HTMLTranslator
3636
from sphinx.locale import versionlabels

Doc/tools/sphinxext/static/copybutton.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@ $(document).ready(function() {
1717
'cursor':'pointer', 'position': 'absolute', 'top': '0', 'right': '0',
1818
'border-color': border_color, 'border-style': border_style,
1919
'border-width': border_width, 'color': border_color, 'text-size': '75%',
20-
'font-family': 'monospace', 'padding-left': '0.2em', 'padding-right': '0.2em'
20+
'font-family': 'monospace', 'padding-left': '0.2em', 'padding-right': '0.2em',
21+
'border-radius': '0 3px 0 0'
2122
}
2223

2324
// create and add the button to all the code blocks that contain >>>

0 commit comments

Comments
 (0)