Show More
@@ -1,299 +1,298 b'' | |||||
1 | # -*- coding: utf-8 -*- |
|
1 | # -*- coding: utf-8 -*- | |
2 | # |
|
2 | # | |
3 | # IPython documentation build configuration file. |
|
3 | # IPython documentation build configuration file. | |
4 |
|
4 | |||
5 | # NOTE: This file has been edited manually from the auto-generated one from |
|
5 | # NOTE: This file has been edited manually from the auto-generated one from | |
6 | # sphinx. Do NOT delete and re-generate. If any changes from sphinx are |
|
6 | # sphinx. Do NOT delete and re-generate. If any changes from sphinx are | |
7 | # needed, generate a scratch one and merge by hand any new fields needed. |
|
7 | # needed, generate a scratch one and merge by hand any new fields needed. | |
8 |
|
8 | |||
9 | # |
|
9 | # | |
10 | # This file is execfile()d with the current directory set to its containing dir. |
|
10 | # This file is execfile()d with the current directory set to its containing dir. | |
11 | # |
|
11 | # | |
12 | # The contents of this file are pickled, so don't put values in the namespace |
|
12 | # The contents of this file are pickled, so don't put values in the namespace | |
13 | # that aren't pickleable (module imports are okay, they're removed automatically). |
|
13 | # that aren't pickleable (module imports are okay, they're removed automatically). | |
14 | # |
|
14 | # | |
15 | # All configuration values have a default value; values that are commented out |
|
15 | # All configuration values have a default value; values that are commented out | |
16 | # serve to show the default value. |
|
16 | # serve to show the default value. | |
17 |
|
17 | |||
18 | import sys, os |
|
18 | import sys, os | |
19 |
|
19 | |||
20 | # http://read-the-docs.readthedocs.io/en/latest/faq.html |
|
20 | # http://read-the-docs.readthedocs.io/en/latest/faq.html | |
21 | ON_RTD = os.environ.get('READTHEDOCS', None) == 'True' |
|
21 | ON_RTD = os.environ.get('READTHEDOCS', None) == 'True' | |
22 |
|
22 | |||
23 | if ON_RTD: |
|
23 | if ON_RTD: | |
24 | tags.add('rtd') |
|
24 | tags.add('rtd') | |
25 |
|
25 | |||
26 | # RTD doesn't use the Makefile, so re-run autogen_{things}.py here. |
|
26 | # RTD doesn't use the Makefile, so re-run autogen_{things}.py here. | |
27 | for name in ('config', 'api', 'magics', 'shortcuts'): |
|
27 | for name in ('config', 'api', 'magics', 'shortcuts'): | |
28 | fname = 'autogen_{}.py'.format(name) |
|
28 | fname = 'autogen_{}.py'.format(name) | |
29 | fpath = os.path.abspath(os.path.join('..', fname)) |
|
29 | fpath = os.path.abspath(os.path.join('..', fname)) | |
30 | with open(fpath) as f: |
|
30 | with open(fpath) as f: | |
31 | exec(compile(f.read(), fname, 'exec'), { |
|
31 | exec(compile(f.read(), fname, 'exec'), { | |
32 | '__file__': fpath, |
|
32 | '__file__': fpath, | |
33 | '__name__': '__main__', |
|
33 | '__name__': '__main__', | |
34 | }) |
|
34 | }) | |
35 | else: |
|
35 | else: | |
36 | import sphinx_rtd_theme |
|
36 | import sphinx_rtd_theme | |
37 | html_theme = "sphinx_rtd_theme" |
|
37 | html_theme = "sphinx_rtd_theme" | |
38 | html_theme_path = [sphinx_rtd_theme.get_html_theme_path()] |
|
38 | html_theme_path = [sphinx_rtd_theme.get_html_theme_path()] | |
39 |
|
39 | |||
40 | # If your extensions are in another directory, add it here. If the directory |
|
40 | # If your extensions are in another directory, add it here. If the directory | |
41 | # is relative to the documentation root, use os.path.abspath to make it |
|
41 | # is relative to the documentation root, use os.path.abspath to make it | |
42 | # absolute, like shown here. |
|
42 | # absolute, like shown here. | |
43 | sys.path.insert(0, os.path.abspath('../sphinxext')) |
|
43 | sys.path.insert(0, os.path.abspath('../sphinxext')) | |
44 |
|
44 | |||
45 | # We load the ipython release info into a dict by explicit execution |
|
45 | # We load the ipython release info into a dict by explicit execution | |
46 | iprelease = {} |
|
46 | iprelease = {} | |
47 | exec(compile(open('../../IPython/core/release.py').read(), '../../IPython/core/release.py', 'exec'),iprelease) |
|
47 | exec(compile(open('../../IPython/core/release.py').read(), '../../IPython/core/release.py', 'exec'),iprelease) | |
48 |
|
48 | |||
49 | # General configuration |
|
49 | # General configuration | |
50 | # --------------------- |
|
50 | # --------------------- | |
51 |
|
51 | |||
52 | # Add any Sphinx extension module names here, as strings. They can be extensions |
|
52 | # Add any Sphinx extension module names here, as strings. They can be extensions | |
53 | # coming with Sphinx (named 'sphinx.ext.*') or your custom ones. |
|
53 | # coming with Sphinx (named 'sphinx.ext.*') or your custom ones. | |
54 | extensions = [ |
|
54 | extensions = [ | |
55 | 'sphinx.ext.autodoc', |
|
55 | 'sphinx.ext.autodoc', | |
56 | 'sphinx.ext.autosummary', |
|
56 | 'sphinx.ext.autosummary', | |
57 | 'sphinx.ext.doctest', |
|
57 | 'sphinx.ext.doctest', | |
58 | 'sphinx.ext.inheritance_diagram', |
|
58 | 'sphinx.ext.inheritance_diagram', | |
59 | 'sphinx.ext.intersphinx', |
|
59 | 'sphinx.ext.intersphinx', | |
60 | 'sphinx.ext.graphviz', |
|
60 | 'sphinx.ext.graphviz', | |
61 | 'IPython.sphinxext.ipython_console_highlighting', |
|
61 | 'IPython.sphinxext.ipython_console_highlighting', | |
62 | 'IPython.sphinxext.ipython_directive', |
|
62 | 'IPython.sphinxext.ipython_directive', | |
63 | 'sphinx.ext.napoleon', # to preprocess docstrings |
|
63 | 'sphinx.ext.napoleon', # to preprocess docstrings | |
64 | 'github', # for easy GitHub links |
|
64 | 'github', # for easy GitHub links | |
65 | 'magics', |
|
65 | 'magics', | |
66 | 'configtraits', |
|
66 | 'configtraits', | |
67 | ] |
|
67 | ] | |
68 |
|
68 | |||
69 | if ON_RTD: |
|
69 | if ON_RTD: | |
70 | # Remove extensions not currently supported on RTD |
|
70 | # Remove extensions not currently supported on RTD | |
71 | extensions.remove('IPython.sphinxext.ipython_directive') |
|
71 | extensions.remove('IPython.sphinxext.ipython_directive') | |
72 | extensions.remove('IPython.sphinxext.ipython_console_highlighting') |
|
72 | extensions.remove('IPython.sphinxext.ipython_console_highlighting') | |
73 |
|
73 | |||
74 | # Add any paths that contain templates here, relative to this directory. |
|
74 | # Add any paths that contain templates here, relative to this directory. | |
75 | templates_path = ['_templates'] |
|
75 | templates_path = ['_templates'] | |
76 |
|
76 | |||
77 | # The suffix of source filenames. |
|
77 | # The suffix of source filenames. | |
78 | source_suffix = '.rst' |
|
78 | source_suffix = '.rst' | |
79 |
|
79 | |||
80 | rst_prolog = '' |
|
80 | rst_prolog = '' | |
81 |
|
81 | |||
82 | def is_stable(extra): |
|
82 | def is_stable(extra): | |
83 | for ext in {'dev', 'b', 'rc'}: |
|
83 | for ext in {'dev', 'b', 'rc'}: | |
84 | if ext in extra: |
|
84 | if ext in extra: | |
85 | return False |
|
85 | return False | |
86 | return True |
|
86 | return True | |
87 |
|
87 | |||
88 | if is_stable(iprelease['_version_extra']): |
|
88 | if is_stable(iprelease['_version_extra']): | |
89 | tags.add('ipystable') |
|
89 | tags.add('ipystable') | |
90 | else: |
|
90 | else: | |
91 | tags.add('ipydev') |
|
91 | tags.add('ipydev') | |
92 | rst_prolog += """ |
|
92 | rst_prolog += """ | |
93 | .. warning:: |
|
93 | .. warning:: | |
94 |
|
94 | |||
95 | This documentation covers a development version of IPython. The development |
|
95 | This documentation covers a development version of IPython. The development | |
96 | version may differ significantly from the latest stable release. |
|
96 | version may differ significantly from the latest stable release. | |
97 | """ |
|
97 | """ | |
98 |
|
98 | |||
99 | rst_prolog += """ |
|
99 | rst_prolog += """ | |
100 | .. important:: |
|
100 | .. important:: | |
101 |
|
101 | |||
102 | This documentation covers IPython versions 6.0 and higher. Beginning with |
|
102 | This documentation covers IPython versions 6.0 and higher. Beginning with | |
103 | version 6.0, IPython stopped supporting compatibility with Python versions |
|
103 | version 6.0, IPython stopped supporting compatibility with Python versions | |
104 | lower than 3.3 including all versions of Python 2.7. |
|
104 | lower than 3.3 including all versions of Python 2.7. | |
105 |
|
105 | |||
106 | If you are looking for an IPython version compatible with Python 2.7, |
|
106 | If you are looking for an IPython version compatible with Python 2.7, | |
107 | please use the IPython 5.x LTS release and refer to its documentation (LTS |
|
107 | please use the IPython 5.x LTS release and refer to its documentation (LTS | |
108 | is the long term support release). |
|
108 | is the long term support release). | |
109 |
|
109 | |||
110 | """ |
|
110 | """ | |
111 |
|
111 | |||
112 | # The master toctree document. |
|
112 | # The master toctree document. | |
113 | master_doc = 'index' |
|
113 | master_doc = 'index' | |
114 |
|
114 | |||
115 | # General substitutions. |
|
115 | # General substitutions. | |
116 | project = 'IPython' |
|
116 | project = 'IPython' | |
117 | copyright = 'The IPython Development Team' |
|
117 | copyright = 'The IPython Development Team' | |
118 |
|
118 | |||
119 | # ghissue config |
|
119 | # ghissue config | |
120 | github_project_url = "https://github.com/ipython/ipython" |
|
120 | github_project_url = "https://github.com/ipython/ipython" | |
121 |
|
121 | |||
122 | # numpydoc config |
|
122 | # numpydoc config | |
123 | numpydoc_show_class_members = False # Otherwise Sphinx emits thousands of warnings |
|
123 | numpydoc_show_class_members = False # Otherwise Sphinx emits thousands of warnings | |
124 | numpydoc_class_members_toctree = False |
|
124 | numpydoc_class_members_toctree = False | |
125 |
|
125 | |||
126 | # The default replacements for |version| and |release|, also used in various |
|
126 | # The default replacements for |version| and |release|, also used in various | |
127 | # other places throughout the built documents. |
|
127 | # other places throughout the built documents. | |
128 | # |
|
128 | # | |
129 | # The full version, including alpha/beta/rc tags. |
|
129 | # The full version, including alpha/beta/rc tags. | |
130 | release = "%s" % iprelease['version'] |
|
130 | release = "%s" % iprelease['version'] | |
131 | # Just the X.Y.Z part, no '-dev' |
|
131 | # Just the X.Y.Z part, no '-dev' | |
132 | version = iprelease['version'].split('-', 1)[0] |
|
132 | version = iprelease['version'].split('-', 1)[0] | |
133 |
|
133 | |||
134 |
|
134 | |||
135 | # There are two options for replacing |today|: either, you set today to some |
|
135 | # There are two options for replacing |today|: either, you set today to some | |
136 | # non-false value, then it is used: |
|
136 | # non-false value, then it is used: | |
137 | #today = '' |
|
137 | #today = '' | |
138 | # Else, today_fmt is used as the format for a strftime call. |
|
138 | # Else, today_fmt is used as the format for a strftime call. | |
139 | today_fmt = '%B %d, %Y' |
|
139 | today_fmt = '%B %d, %Y' | |
140 |
|
140 | |||
141 | # List of documents that shouldn't be included in the build. |
|
141 | # List of documents that shouldn't be included in the build. | |
142 | #unused_docs = [] |
|
142 | #unused_docs = [] | |
143 |
|
143 | |||
144 | # Exclude these glob-style patterns when looking for source files. They are |
|
144 | # Exclude these glob-style patterns when looking for source files. They are | |
145 | # relative to the source/ directory. |
|
145 | # relative to the source/ directory. | |
146 | exclude_patterns = ['whatsnew/pr/antigravity-feature.*', |
|
146 | exclude_patterns = [] | |
147 | 'whatsnew/pr/incompat-switching-to-perl.*'] |
|
|||
148 |
|
147 | |||
149 |
|
148 | |||
150 | # If true, '()' will be appended to :func: etc. cross-reference text. |
|
149 | # If true, '()' will be appended to :func: etc. cross-reference text. | |
151 | #add_function_parentheses = True |
|
150 | #add_function_parentheses = True | |
152 |
|
151 | |||
153 | # If true, the current module name will be prepended to all description |
|
152 | # If true, the current module name will be prepended to all description | |
154 | # unit titles (such as .. function::). |
|
153 | # unit titles (such as .. function::). | |
155 | #add_module_names = True |
|
154 | #add_module_names = True | |
156 |
|
155 | |||
157 | # If true, sectionauthor and moduleauthor directives will be shown in the |
|
156 | # If true, sectionauthor and moduleauthor directives will be shown in the | |
158 | # output. They are ignored by default. |
|
157 | # output. They are ignored by default. | |
159 | #show_authors = False |
|
158 | #show_authors = False | |
160 |
|
159 | |||
161 | # The name of the Pygments (syntax highlighting) style to use. |
|
160 | # The name of the Pygments (syntax highlighting) style to use. | |
162 | pygments_style = 'sphinx' |
|
161 | pygments_style = 'sphinx' | |
163 |
|
162 | |||
164 | # Set the default role so we can use `foo` instead of ``foo`` |
|
163 | # Set the default role so we can use `foo` instead of ``foo`` | |
165 | default_role = 'literal' |
|
164 | default_role = 'literal' | |
166 |
|
165 | |||
167 | # Options for HTML output |
|
166 | # Options for HTML output | |
168 | # ----------------------- |
|
167 | # ----------------------- | |
169 |
|
168 | |||
170 | # The style sheet to use for HTML and HTML Help pages. A file of that name |
|
169 | # The style sheet to use for HTML and HTML Help pages. A file of that name | |
171 | # must exist either in Sphinx' static/ path, or in one of the custom paths |
|
170 | # must exist either in Sphinx' static/ path, or in one of the custom paths | |
172 | # given in html_static_path. |
|
171 | # given in html_static_path. | |
173 | # html_style = 'default.css' |
|
172 | # html_style = 'default.css' | |
174 |
|
173 | |||
175 |
|
174 | |||
176 | # The name for this set of Sphinx documents. If None, it defaults to |
|
175 | # The name for this set of Sphinx documents. If None, it defaults to | |
177 | # "<project> v<release> documentation". |
|
176 | # "<project> v<release> documentation". | |
178 | #html_title = None |
|
177 | #html_title = None | |
179 |
|
178 | |||
180 | # The name of an image file (within the static path) to place at the top of |
|
179 | # The name of an image file (within the static path) to place at the top of | |
181 | # the sidebar. |
|
180 | # the sidebar. | |
182 | #html_logo = None |
|
181 | #html_logo = None | |
183 |
|
182 | |||
184 | # Add any paths that contain custom static files (such as style sheets) here, |
|
183 | # Add any paths that contain custom static files (such as style sheets) here, | |
185 | # relative to this directory. They are copied after the builtin static files, |
|
184 | # relative to this directory. They are copied after the builtin static files, | |
186 | # so a file named "default.css" will overwrite the builtin "default.css". |
|
185 | # so a file named "default.css" will overwrite the builtin "default.css". | |
187 | html_static_path = ['_static'] |
|
186 | html_static_path = ['_static'] | |
188 |
|
187 | |||
189 | # Favicon needs the directory name |
|
188 | # Favicon needs the directory name | |
190 | html_favicon = '_static/favicon.ico' |
|
189 | html_favicon = '_static/favicon.ico' | |
191 | # If not '', a 'Last updated on:' timestamp is inserted at every page bottom, |
|
190 | # If not '', a 'Last updated on:' timestamp is inserted at every page bottom, | |
192 | # using the given strftime format. |
|
191 | # using the given strftime format. | |
193 | html_last_updated_fmt = '%b %d, %Y' |
|
192 | html_last_updated_fmt = '%b %d, %Y' | |
194 |
|
193 | |||
195 | # If true, SmartyPants will be used to convert quotes and dashes to |
|
194 | # If true, SmartyPants will be used to convert quotes and dashes to | |
196 | # typographically correct entities. |
|
195 | # typographically correct entities. | |
197 | #html_use_smartypants = True |
|
196 | #html_use_smartypants = True | |
198 |
|
197 | |||
199 | # Custom sidebar templates, maps document names to template names. |
|
198 | # Custom sidebar templates, maps document names to template names. | |
200 | #html_sidebars = {} |
|
199 | #html_sidebars = {} | |
201 |
|
200 | |||
202 | # Additional templates that should be rendered to pages, maps page names to |
|
201 | # Additional templates that should be rendered to pages, maps page names to | |
203 | # template names. |
|
202 | # template names. | |
204 | html_additional_pages = { |
|
203 | html_additional_pages = { | |
205 | 'interactive/htmlnotebook': 'notebook_redirect.html', |
|
204 | 'interactive/htmlnotebook': 'notebook_redirect.html', | |
206 | 'interactive/notebook': 'notebook_redirect.html', |
|
205 | 'interactive/notebook': 'notebook_redirect.html', | |
207 | 'interactive/nbconvert': 'notebook_redirect.html', |
|
206 | 'interactive/nbconvert': 'notebook_redirect.html', | |
208 | 'interactive/public_server': 'notebook_redirect.html', |
|
207 | 'interactive/public_server': 'notebook_redirect.html', | |
209 | } |
|
208 | } | |
210 |
|
209 | |||
211 | # If false, no module index is generated. |
|
210 | # If false, no module index is generated. | |
212 | #html_use_modindex = True |
|
211 | #html_use_modindex = True | |
213 |
|
212 | |||
214 | # If true, the reST sources are included in the HTML build as _sources/<name>. |
|
213 | # If true, the reST sources are included in the HTML build as _sources/<name>. | |
215 | #html_copy_source = True |
|
214 | #html_copy_source = True | |
216 |
|
215 | |||
217 | # If true, an OpenSearch description file will be output, and all pages will |
|
216 | # If true, an OpenSearch description file will be output, and all pages will | |
218 | # contain a <link> tag referring to it. The value of this option must be the |
|
217 | # contain a <link> tag referring to it. The value of this option must be the | |
219 | # base URL from which the finished HTML is served. |
|
218 | # base URL from which the finished HTML is served. | |
220 | #html_use_opensearch = '' |
|
219 | #html_use_opensearch = '' | |
221 |
|
220 | |||
222 | # If nonempty, this is the file name suffix for HTML files (e.g. ".xhtml"). |
|
221 | # If nonempty, this is the file name suffix for HTML files (e.g. ".xhtml"). | |
223 | #html_file_suffix = '' |
|
222 | #html_file_suffix = '' | |
224 |
|
223 | |||
225 | # Output file base name for HTML help builder. |
|
224 | # Output file base name for HTML help builder. | |
226 | htmlhelp_basename = 'ipythondoc' |
|
225 | htmlhelp_basename = 'ipythondoc' | |
227 |
|
226 | |||
228 | intersphinx_mapping = {'python': ('https://docs.python.org/3/', None), |
|
227 | intersphinx_mapping = {'python': ('https://docs.python.org/3/', None), | |
229 | 'rpy2': ('https://rpy2.readthedocs.io/en/version_2.8.x/', None), |
|
228 | 'rpy2': ('https://rpy2.readthedocs.io/en/version_2.8.x/', None), | |
230 | 'traitlets': ('https://traitlets.readthedocs.io/en/latest/', None), |
|
229 | 'traitlets': ('https://traitlets.readthedocs.io/en/latest/', None), | |
231 | 'jupyterclient': ('https://jupyter-client.readthedocs.io/en/latest/', None), |
|
230 | 'jupyterclient': ('https://jupyter-client.readthedocs.io/en/latest/', None), | |
232 | 'ipyparallel': ('https://ipyparallel.readthedocs.io/en/latest/', None), |
|
231 | 'ipyparallel': ('https://ipyparallel.readthedocs.io/en/latest/', None), | |
233 | 'jupyter': ('https://jupyter.readthedocs.io/en/latest/', None), |
|
232 | 'jupyter': ('https://jupyter.readthedocs.io/en/latest/', None), | |
234 | 'jedi': ('https://jedi.readthedocs.io/en/latest/', None), |
|
233 | 'jedi': ('https://jedi.readthedocs.io/en/latest/', None), | |
235 | 'traitlets': ('https://traitlets.readthedocs.io/en/latest/', None), |
|
234 | 'traitlets': ('https://traitlets.readthedocs.io/en/latest/', None), | |
236 | 'ipykernel': ('https://ipykernel.readthedocs.io/en/latest/', None), |
|
235 | 'ipykernel': ('https://ipykernel.readthedocs.io/en/latest/', None), | |
237 | 'prompt_toolkit' : ('https://python-prompt-toolkit.readthedocs.io/en/stable/', None), |
|
236 | 'prompt_toolkit' : ('https://python-prompt-toolkit.readthedocs.io/en/stable/', None), | |
238 | 'ipywidgets': ('https://ipywidgets.readthedocs.io/en/stable/', None), |
|
237 | 'ipywidgets': ('https://ipywidgets.readthedocs.io/en/stable/', None), | |
239 | 'ipyparallel': ('https://ipyparallel.readthedocs.io/en/stable/', None) |
|
238 | 'ipyparallel': ('https://ipyparallel.readthedocs.io/en/stable/', None) | |
240 | } |
|
239 | } | |
241 |
|
240 | |||
242 | # Options for LaTeX output |
|
241 | # Options for LaTeX output | |
243 | # ------------------------ |
|
242 | # ------------------------ | |
244 |
|
243 | |||
245 | # The paper size ('letter' or 'a4'). |
|
244 | # The paper size ('letter' or 'a4'). | |
246 | latex_paper_size = 'letter' |
|
245 | latex_paper_size = 'letter' | |
247 |
|
246 | |||
248 | # The font size ('10pt', '11pt' or '12pt'). |
|
247 | # The font size ('10pt', '11pt' or '12pt'). | |
249 | latex_font_size = '11pt' |
|
248 | latex_font_size = '11pt' | |
250 |
|
249 | |||
251 | # Grouping the document tree into LaTeX files. List of tuples |
|
250 | # Grouping the document tree into LaTeX files. List of tuples | |
252 | # (source start file, target name, title, author, document class [howto/manual]). |
|
251 | # (source start file, target name, title, author, document class [howto/manual]). | |
253 |
|
252 | |||
254 | latex_documents = [ |
|
253 | latex_documents = [ | |
255 | ('index', 'ipython.tex', 'IPython Documentation', |
|
254 | ('index', 'ipython.tex', 'IPython Documentation', | |
256 | u"""The IPython Development Team""", 'manual', True), |
|
255 | u"""The IPython Development Team""", 'manual', True), | |
257 | ('parallel/winhpc_index', 'winhpc_whitepaper.tex', |
|
256 | ('parallel/winhpc_index', 'winhpc_whitepaper.tex', | |
258 | 'Using IPython on Windows HPC Server 2008', |
|
257 | 'Using IPython on Windows HPC Server 2008', | |
259 | u"Brian E. Granger", 'manual', True) |
|
258 | u"Brian E. Granger", 'manual', True) | |
260 | ] |
|
259 | ] | |
261 |
|
260 | |||
262 | # The name of an image file (relative to this directory) to place at the top of |
|
261 | # The name of an image file (relative to this directory) to place at the top of | |
263 | # the title page. |
|
262 | # the title page. | |
264 | #latex_logo = None |
|
263 | #latex_logo = None | |
265 |
|
264 | |||
266 | # For "manual" documents, if this is true, then toplevel headings are parts, |
|
265 | # For "manual" documents, if this is true, then toplevel headings are parts, | |
267 | # not chapters. |
|
266 | # not chapters. | |
268 | #latex_use_parts = False |
|
267 | #latex_use_parts = False | |
269 |
|
268 | |||
270 | # Additional stuff for the LaTeX preamble. |
|
269 | # Additional stuff for the LaTeX preamble. | |
271 | #latex_preamble = '' |
|
270 | #latex_preamble = '' | |
272 |
|
271 | |||
273 | # Documents to append as an appendix to all manuals. |
|
272 | # Documents to append as an appendix to all manuals. | |
274 | #latex_appendices = [] |
|
273 | #latex_appendices = [] | |
275 |
|
274 | |||
276 | # If false, no module index is generated. |
|
275 | # If false, no module index is generated. | |
277 | latex_use_modindex = True |
|
276 | latex_use_modindex = True | |
278 |
|
277 | |||
279 |
|
278 | |||
280 | # Options for texinfo output |
|
279 | # Options for texinfo output | |
281 | # -------------------------- |
|
280 | # -------------------------- | |
282 |
|
281 | |||
283 | texinfo_documents = [ |
|
282 | texinfo_documents = [ | |
284 | (master_doc, 'ipython', 'IPython Documentation', |
|
283 | (master_doc, 'ipython', 'IPython Documentation', | |
285 | 'The IPython Development Team', |
|
284 | 'The IPython Development Team', | |
286 | 'IPython', |
|
285 | 'IPython', | |
287 | 'IPython Documentation', |
|
286 | 'IPython Documentation', | |
288 | 'Programming', |
|
287 | 'Programming', | |
289 | 1), |
|
288 | 1), | |
290 | ] |
|
289 | ] | |
291 |
|
290 | |||
292 | modindex_common_prefix = ['IPython.'] |
|
291 | modindex_common_prefix = ['IPython.'] | |
293 |
|
292 | |||
294 |
|
293 | |||
295 | # Cleanup |
|
294 | # Cleanup | |
296 | # ------- |
|
295 | # ------- | |
297 | # delete release info to avoid pickling errors from sphinx |
|
296 | # delete release info to avoid pickling errors from sphinx | |
298 |
|
297 | |||
299 | del iprelease |
|
298 | del iprelease |
@@ -1,46 +1,32 b'' | |||||
1 | ===================== |
|
1 | ===================== | |
2 | Development version |
|
2 | Development version | |
3 | ===================== |
|
3 | ===================== | |
4 |
|
4 | |||
5 | This document describes in-flight development work. |
|
5 | This document describes in-flight development work. | |
6 |
|
6 | |||
7 | .. warning:: |
|
7 | .. warning:: | |
8 |
|
8 | |||
9 | Please do not edit this file by hand (doing so will likely cause merge |
|
9 | Please do not edit this file by hand (doing so will likely cause merge | |
10 | conflicts for other Pull Requests). Instead, create a new file in the |
|
10 | conflicts for other Pull Requests). Instead, create a new file in the | |
11 | `docs/source/whatsnew/pr` folder |
|
11 | `docs/source/whatsnew/pr` folder | |
12 |
|
12 | |||
13 |
|
13 | |||
14 | Released .... ...., 2017 |
|
14 | Released .... ...., 2017 | |
15 |
|
15 | |||
16 |
|
16 | |||
17 | Need to be updated: |
|
17 | Need to be updated: | |
18 |
|
18 | |||
19 | .. toctree:: |
|
19 | .. toctree:: | |
20 | :maxdepth: 2 |
|
20 | :maxdepth: 2 | |
21 |
:glob: |
|
21 | :glob: | |
22 |
|
22 | |||
23 | pr/* |
|
23 | pr/* | |
24 |
|
24 | |||
25 | IPython 6 feature a major improvement in the completion machinery which is now |
|
|||
26 | capable of completing non-executed code. It is also the first version of IPython |
|
|||
27 | to stop compatibility with Python 2, which is still supported on the bugfix only |
|
|||
28 | 5.x branch. Read below to have a non-exhaustive list of new features. |
|
|||
29 |
|
||||
30 | Make sure you have pip > 9.0 before upgrading. |
|
|||
31 | You should be able to update by using: |
|
|||
32 |
|
||||
33 | .. code:: |
|
|||
34 |
|
||||
35 | pip install ipython --upgrade |
|
|||
36 |
|
||||
37 |
|
||||
38 |
|
||||
39 |
|
25 | |||
40 | .. DO NOT EDIT THIS LINE BEFORE RELEASE. FEATURE INSERTION POINT. |
|
26 | .. DO NOT EDIT THIS LINE BEFORE RELEASE. FEATURE INSERTION POINT. | |
41 |
|
27 | |||
42 |
|
28 | |||
43 | Backwards incompatible changes |
|
29 | Backwards incompatible changes | |
44 | ------------------------------ |
|
30 | ------------------------------ | |
45 |
|
31 | |||
46 | .. DO NOT EDIT THIS LINE BEFORE RELEASE. INCOMPAT INSERTION POINT. |
|
32 | .. DO NOT EDIT THIS LINE BEFORE RELEASE. INCOMPAT INSERTION POINT. |
@@ -1,45 +1,46 b'' | |||||
1 | .. Developers should add in this file, during each release cycle, information |
|
1 | .. Developers should add in this file, during each release cycle, information | |
2 | .. about important changes they've made, in a summary format that's meant for |
|
2 | .. about important changes they've made, in a summary format that's meant for | |
3 | .. end users. For each release we normally have three sections: features, bug |
|
3 | .. end users. For each release we normally have three sections: features, bug | |
4 | .. fixes and api breakage. |
|
4 | .. fixes and api breakage. | |
5 | .. Please remember to credit the authors of the contributions by name, |
|
5 | .. Please remember to credit the authors of the contributions by name, | |
6 | .. especially when they are new users or developers who do not regularly |
|
6 | .. especially when they are new users or developers who do not regularly | |
7 | .. participate in IPython's development. |
|
7 | .. participate in IPython's development. | |
8 |
|
8 | |||
9 | .. _whatsnew_index: |
|
9 | .. _whatsnew_index: | |
10 |
|
10 | |||
11 | ===================== |
|
11 | ===================== | |
12 | What's new in IPython |
|
12 | What's new in IPython | |
13 | ===================== |
|
13 | ===================== | |
14 |
|
14 | |||
15 | This section documents the changes that have been made in various versions of |
|
15 | This section documents the changes that have been made in various versions of | |
16 | IPython. Users should consult these pages to learn about new features, bug |
|
16 | IPython. Users should consult these pages to learn about new features, bug | |
17 | fixes and backwards incompatibilities. Developers should summarize the |
|
17 | fixes and backwards incompatibilities. Developers should summarize the | |
18 | development work they do here in a user friendly format. |
|
18 | development work they do here in a user friendly format. | |
19 |
|
19 | |||
20 | .. toctree:: |
|
20 | .. toctree:: | |
21 | :maxdepth: 1 |
|
21 | :maxdepth: 1 | |
22 |
|
22 | |||
23 | development |
|
23 | development | |
|
24 | version7 | |||
24 | version6 |
|
25 | version6 | |
25 | github-stats-6 |
|
26 | github-stats-6 | |
26 | version5 |
|
27 | version5 | |
27 | github-stats-5 |
|
28 | github-stats-5 | |
28 | version4 |
|
29 | version4 | |
29 | github-stats-4 |
|
30 | github-stats-4 | |
30 | version3 |
|
31 | version3 | |
31 | github-stats-3 |
|
32 | github-stats-3 | |
32 | version3_widget_migration |
|
33 | version3_widget_migration | |
33 | version2.0 |
|
34 | version2.0 | |
34 | github-stats-2.0 |
|
35 | github-stats-2.0 | |
35 | version1.0 |
|
36 | version1.0 | |
36 | github-stats-1.0 |
|
37 | github-stats-1.0 | |
37 | version0.13 |
|
38 | version0.13 | |
38 | github-stats-0.13 |
|
39 | github-stats-0.13 | |
39 | version0.12 |
|
40 | version0.12 | |
40 | github-stats-0.12 |
|
41 | github-stats-0.12 | |
41 | version0.11 |
|
42 | version0.11 | |
42 | github-stats-0.11 |
|
43 | github-stats-0.11 | |
43 | version0.10 |
|
44 | version0.10 | |
44 | version0.9 |
|
45 | version0.9 | |
45 | version0.8 |
|
46 | version0.8 |
@@ -0,0 +1,5 b'' | |||||
|
1 | Antigravity feature | |||
|
2 | =================== | |||
|
3 | ||||
|
4 | Example new antigravity feature. Try ``import antigravity`` in a Python 3 | |||
|
5 | console. |
@@ -0,0 +1,1 b'' | |||||
|
1 | Starting with IPython 42, only perl code execution is allowed. See :ghpull:`42` |
@@ -1,99 +1,214 b'' | |||||
|
1 | ============ | |||
|
2 | 7.x Series | |||
|
3 | ============ | |||
|
4 | ||||
|
5 | .. _whatsnew700: | |||
|
6 | ||||
|
7 | IPython 7.0.0 | |||
|
8 | ============= | |||
|
9 | ||||
|
10 | .. warning:: | |||
|
11 | ||||
|
12 | IPython 7.0 is currently in Beta, Feedback on API/changes and | |||
|
13 | addition/updates to this cahngelog are welcomed. | |||
|
14 | ||||
|
15 | Released .... ...., 2017 | |||
|
16 | ||||
|
17 | IPython 7 include major features improvement as you can read in the following | |||
|
18 | changelog. This is also the second major version of IPython to stop support only | |||
|
19 | Python 3 – starting at Python 3.4. Python 2 is still still community supported | |||
|
20 | on the bugfix only 5.x branch, but we remind you that Python 2 EOL is Jan 1st | |||
|
21 | 2020. | |||
|
22 | ||||
|
23 | We were able to backport bug fixes to the 5.x branch thanks to our backport bot which | |||
|
24 | backported more than `70 Pull-Requests | |||
|
25 | <https://github.com/ipython/ipython/pulls?page=3&q=is%3Apr+sort%3Aupdated-desc+author%3Aapp%2Fmeeseeksdev++5.x&utf8=%E2%9C%93>`_, but there are still many PRs that required manually work, and this is an area of the project were you can easily contribute by looking for `PRs still needed backport<https://github.com/ipython/ipython/issues?q=label%3A%22Still+Needs+Manual+Backport%22+is%3Aclosed+sort%3Aupdated-desc>`_ | |||
|
26 | ||||
|
27 | IPython 6.x branch will likely not see any further release unless we critical | |||
|
28 | bugs are found. | |||
|
29 | ||||
|
30 | Make sure you have pip > 9.0 before upgrading. You should be able to update by simply runngin | |||
|
31 | ||||
|
32 | .. code:: | |||
|
33 | ||||
|
34 | pip install ipython --upgrade | |||
|
35 | ||||
|
36 | Or if you have conda installed: | |||
|
37 | ||||
|
38 | .. code:: | |||
|
39 | ||||
|
40 | conda install ipython | |||
|
41 | ||||
|
42 | ||||
|
43 | ||||
|
44 | Prompt Toolkit 2.0 | |||
|
45 | ------------------ | |||
|
46 | ||||
|
47 | IPython 7.0+ now use ``prompt_toolkit 2.0``, if you still need to use earlier | |||
|
48 | ``prompt_toolkit`` version you may need to pin IPython to ``<7.0``. | |||
|
49 | ||||
1 | Autowait: Asynchronous REPL |
|
50 | Autowait: Asynchronous REPL | |
2 | --------------------------- |
|
51 | --------------------------- | |
3 |
|
52 | |||
4 | Staring with IPython 7.0 and on Python 3.6+, IPython can automatically await |
|
53 | Staring with IPython 7.0 and on Python 3.6+, IPython can automatically await | |
5 | code at top level, you should not need to access an event loop or runner |
|
54 | code at top level, you should not need to access an event loop or runner | |
6 | yourself. To know more read the :ref:`autoawait` section of our docs, see |
|
55 | yourself. To know more read the :ref:`autoawait` section of our docs, see | |
7 | :ghpull:`11265` or try the following code:: |
|
56 | :ghpull:`11265` or try the following code:: | |
8 |
|
57 | |||
9 | Python 3.6.0 |
|
58 | Python 3.6.0 | |
10 | Type 'copyright', 'credits' or 'license' for more information |
|
59 | Type 'copyright', 'credits' or 'license' for more information | |
11 | IPython 7.0.0 -- An enhanced Interactive Python. Type '?' for help. |
|
60 | IPython 7.0.0 -- An enhanced Interactive Python. Type '?' for help. | |
12 |
|
61 | |||
13 | In [1]: import aiohttp |
|
62 | In [1]: import aiohttp | |
14 | ...: result = aiohttp.get('https://api.github.com') |
|
63 | ...: result = aiohttp.get('https://api.github.com') | |
15 |
|
64 | |||
16 | In [2]: response = await result |
|
65 | In [2]: response = await result | |
17 | <pause for a few 100s ms> |
|
66 | <pause for a few 100s ms> | |
18 |
|
67 | |||
19 | In [3]: await response.json() |
|
68 | In [3]: await response.json() | |
20 | Out[3]: |
|
69 | Out[3]: | |
21 | {'authorizations_url': 'https://api.github.com/authorizations', |
|
70 | {'authorizations_url': 'https://api.github.com/authorizations', | |
22 | 'code_search_url': 'https://api.github.com/search/code?q={query}{&page,per_page,sort,order}', |
|
71 | 'code_search_url': 'https://api.github.com/search/code?q={query}{&page,per_page,sort,order}', | |
23 | ... |
|
72 | ... | |
24 | } |
|
73 | } | |
25 |
|
74 | |||
26 | .. note:: |
|
75 | .. note:: | |
27 |
|
76 | |||
28 | Async integration is experimental code, behavior may change or be removed |
|
77 | Async integration is experimental code, behavior may change or be removed | |
29 | between Python and IPython versions without warnings. |
|
78 | between Python and IPython versions without warnings. | |
30 |
|
79 | |||
31 |
Integration is by default with `asyncio`, but other libraries can be configured, |
|
80 | Integration is by default with `asyncio`, but other libraries can be configured, | |
32 | like ``curio`` or ``trio``, to improve concurrency in the REPL:: |
|
81 | like ``curio`` or ``trio``, to improve concurrency in the REPL:: | |
33 |
|
82 | |||
34 | In [1]: %autoawait trio |
|
83 | In [1]: %autoawait trio | |
35 |
|
84 | |||
36 | In [2]: import trio |
|
85 | In [2]: import trio | |
37 |
|
86 | |||
38 | In [3]: async def child(i): |
|
87 | In [3]: async def child(i): | |
39 | ...: print(" child %s goes to sleep"%i) |
|
88 | ...: print(" child %s goes to sleep"%i) | |
40 | ...: await trio.sleep(2) |
|
89 | ...: await trio.sleep(2) | |
41 | ...: print(" child %s wakes up"%i) |
|
90 | ...: print(" child %s wakes up"%i) | |
42 |
|
91 | |||
43 | In [4]: print('parent start') |
|
92 | In [4]: print('parent start') | |
44 | ...: async with trio.open_nursery() as n: |
|
93 | ...: async with trio.open_nursery() as n: | |
45 | ...: for i in range(3): |
|
94 | ...: for i in range(3): | |
46 | ...: n.spawn(child, i) |
|
95 | ...: n.spawn(child, i) | |
47 | ...: print('parent end') |
|
96 | ...: print('parent end') | |
48 | parent start |
|
97 | parent start | |
49 | child 2 goes to sleep |
|
98 | child 2 goes to sleep | |
50 | child 0 goes to sleep |
|
99 | child 0 goes to sleep | |
51 | child 1 goes to sleep |
|
100 | child 1 goes to sleep | |
52 | <about 2 seconds pause> |
|
101 | <about 2 seconds pause> | |
53 | child 2 wakes up |
|
102 | child 2 wakes up | |
54 | child 1 wakes up |
|
103 | child 1 wakes up | |
55 | child 0 wakes up |
|
104 | child 0 wakes up | |
56 | parent end |
|
105 | parent end | |
57 |
|
106 | |||
58 | See :ref:`autoawait` for more information. |
|
107 | See :ref:`autoawait` for more information. | |
59 |
|
108 | |||
60 |
|
109 | |||
61 | Asynchronous code in a Notebook interface or any other frontend using the |
|
110 | Asynchronous code in a Notebook interface or any other frontend using the | |
62 | Jupyter Protocol will need further updates of the IPykernel package. |
|
111 | Jupyter Protocol will need further updates of the IPykernel package. | |
63 |
|
112 | |||
64 |
Non-Asynchronous code |
|
113 | Non-Asynchronous code | |
65 | --------------------- |
|
114 | ~~~~~~~~~~~~~~~~~~~~~ | |
66 |
|
115 | |||
67 | As the internal API of IPython are now asynchronous, IPython need to run under |
|
116 | As the internal API of IPython are now asynchronous, IPython need to run under | |
68 | an even loop. In order to allow many workflow, (like using the ``%run`` magic, |
|
117 | an even loop. In order to allow many workflow, (like using the ``%run`` magic, | |
69 | or copy_pasting code that explicitly starts/stop event loop), when top-level code |
|
118 | or copy_pasting code that explicitly starts/stop event loop), when top-level code | |
70 | is detected as not being asynchronous, IPython code is advanced via a |
|
119 | is detected as not being asynchronous, IPython code is advanced via a | |
71 | pseudo-synchronous runner, and will not may not advance pending tasks. |
|
120 | pseudo-synchronous runner, and will not may not advance pending tasks. | |
72 |
|
121 | |||
73 | Change to Nested Embed |
|
122 | Change to Nested Embed | |
74 | ---------------------- |
|
123 | ~~~~~~~~~~~~~~~~~~~~~~ | |
75 |
|
124 | |||
76 | The introduction of the ability to run async code had some effect on the |
|
125 | The introduction of the ability to run async code had some effect on the | |
77 | ``IPython.embed()`` API. By default embed will not allow you to run asynchronous |
|
126 | ``IPython.embed()`` API. By default embed will not allow you to run asynchronous | |
78 | code unless a event loop is specified. |
|
127 | code unless a event loop is specified. | |
79 |
|
128 | |||
80 | Effects on Magics |
|
129 | Effects on Magics | |
81 | ----------------- |
|
130 | ~~~~~~~~~~~~~~~~~ | |
82 |
|
131 | |||
83 | Some magics will not work with Async, and will need updates. Contribution |
|
132 | Some magics will not work with Async, and will need updates. Contribution | |
84 | welcome. |
|
133 | welcome. | |
85 |
|
134 | |||
86 | Expected Future changes |
|
135 | Expected Future changes | |
87 | ----------------------- |
|
136 | ~~~~~~~~~~~~~~~~~~~~~~~ | |
88 |
|
137 | |||
89 | We expect more internal but public IPython function to become ``async``, and |
|
138 | We expect more internal but public IPython function to become ``async``, and | |
90 | will likely end up having a persisting event loop while IPython is running. |
|
139 | will likely end up having a persisting event loop while IPython is running. | |
91 |
|
140 | |||
92 | Thanks |
|
141 | Thanks | |
93 | ------ |
|
142 | ~~~~~~ | |
94 |
|
143 | |||
95 | This took more than a year in the making, and the code was rebased a number of |
|
144 | This took more than a year in the making, and the code was rebased a number of | |
96 | time leading to commit authorship that may have been lost in the final |
|
145 | time leading to commit authorship that may have been lost in the final | |
97 | Pull-Request. Huge thanks to many people for contribution, discussion, code, |
|
146 | Pull-Request. Huge thanks to many people for contribution, discussion, code, | |
98 | documentation, use-case: dalejung, danielballan, ellisonbg, fperez, gnestor, |
|
147 | documentation, use-case: dalejung, danielballan, ellisonbg, fperez, gnestor, | |
99 | minrk, njsmith, pganssle, tacaswell, takluyver , vidartf ... And many other. |
|
148 | minrk, njsmith, pganssle, tacaswell, takluyver , vidartf ... And many other. | |
|
149 | ||||
|
150 | ||||
|
151 | Autoreload Improvment | |||
|
152 | --------------------- | |||
|
153 | ||||
|
154 | The magic ``%autoreload 2`` now captures new methods added to classes. Earlier, only methods existing as of the initial import were being tracked and updated. | |||
|
155 | ||||
|
156 | This new feature helps dual environment development - Jupyter+IDE - where the code gradually moves from notebook cells to package files, as it gets structured. | |||
|
157 | ||||
|
158 | **Example**: An instance of the class `MyClass` will be able to access the method `cube()` after it is uncommented and the file `file1.py` saved on disk. | |||
|
159 | ||||
|
160 | ||||
|
161 | ..code:: | |||
|
162 | ||||
|
163 | # notebook | |||
|
164 | ||||
|
165 | from mymodule import MyClass | |||
|
166 | first = MyClass(5) | |||
|
167 | ||||
|
168 | .. code:: | |||
|
169 | # mymodule/file1.py | |||
|
170 | ||||
|
171 | class MyClass: | |||
|
172 | ||||
|
173 | def __init__(self, a=10): | |||
|
174 | self.a = a | |||
|
175 | ||||
|
176 | def square(self): | |||
|
177 | print('compute square') | |||
|
178 | return self.a*self.a | |||
|
179 | ||||
|
180 | # def cube(self): | |||
|
181 | # print('compute cube') | |||
|
182 | # return self.a*self.a*self.a | |||
|
183 | ||||
|
184 | ||||
|
185 | ||||
|
186 | ||||
|
187 | Misc | |||
|
188 | ---- | |||
|
189 | ||||
|
190 | The autoindent feature that was deprecated in 5.x was re-enabled and | |||
|
191 | un-deprecated in :ghpull:`11257` | |||
|
192 | ||||
|
193 | Make ``%run -n -i ...`` work correctly. Earlier, if ``%run`` was passed both arguments, ``-n`` would be silently ignored. See :ghpull:`10308` | |||
|
194 | ||||
|
195 | ||||
|
196 | ||||
|
197 | ||||
|
198 | ||||
|
199 | Deprecations | |||
|
200 | ------------ | |||
|
201 | ||||
|
202 | A couple of unused function and methods have been deprecated and will be removed | |||
|
203 | in future versions: | |||
|
204 | ||||
|
205 | - ``IPython.utils.io.raw_print_err`` | |||
|
206 | - ``IPython.utils.io.raw_print`` | |||
|
207 | ||||
|
208 | ||||
|
209 | Backwards incompatible changes | |||
|
210 | ------------------------------ | |||
|
211 | ||||
|
212 | * The API for transforming input before it is parsed as Python code has been | |||
|
213 | completely redesigned, and any custom input transformations will need to be | |||
|
214 | rewritten. See :doc:`/config/inputtransforms` for details of the new API. |
@@ -1,43 +1,46 b'' | |||||
1 | """ |
|
1 | """ | |
2 | This tool is used during CI testing to make sure sphinx raise no error. |
|
2 | This tool is used during CI testing to make sure sphinx raise no error. | |
3 |
|
3 | |||
4 | During development, we like to have whatsnew/pr/*.rst documents to track |
|
4 | During development, we like to have whatsnew/pr/*.rst documents to track | |
5 | individual new features. Unfortunately they other either: |
|
5 | individual new features. Unfortunately they other either: | |
6 | - have no title (sphinx complains) |
|
6 | - have no title (sphinx complains) | |
7 | - are not included in any toctree (sphinx complain) |
|
7 | - are not included in any toctree (sphinx complain) | |
8 |
|
8 | |||
9 | This fix-them up by "inventing" a title, before building the docs. At release |
|
9 | This fix-them up by "inventing" a title, before building the docs. At release | |
10 | time, these title and files will anyway be rewritten into the actual release |
|
10 | time, these title and files will anyway be rewritten into the actual release | |
11 | notes. |
|
11 | notes. | |
12 | """ |
|
12 | """ | |
13 |
|
13 | |||
14 | import glob |
|
14 | import glob | |
15 |
|
15 | |||
16 |
|
16 | |||
17 | def main(): |
|
17 | def main(): | |
18 | folder = 'docs/source/whatsnew/pr/' |
|
18 | folder = 'docs/source/whatsnew/pr/' | |
19 | assert folder.endswith('/') |
|
19 | assert folder.endswith('/') | |
20 | files = glob.glob(folder+'*.rst') |
|
20 | files = glob.glob(folder+'*.rst') | |
21 | print(files) |
|
21 | print(files) | |
22 |
|
22 | |||
23 | for filename in files: |
|
23 | for filename in files: | |
24 | print('Adding pseudo-title to:', filename) |
|
24 | print('Adding pseudo-title to:', filename) | |
25 | title = filename[:-4].split('/')[-1].replace('-', ' ').capitalize() |
|
25 | title = filename[:-4].split('/')[-1].replace('-', ' ').capitalize() | |
26 |
|
26 | |||
27 | with open(filename) as f: |
|
27 | with open(filename) as f: | |
28 | data = f.read() |
|
28 | data = f.read() | |
|
29 | try: | |||
29 | if data and data.splitlines()[1].startswith('='): |
|
30 | if data and data.splitlines()[1].startswith('='): | |
30 | continue |
|
31 | continue | |
|
32 | except IndexError: | |||
|
33 | pass | |||
31 |
|
34 | |||
32 | with open(filename, 'w') as f: |
|
35 | with open(filename, 'w') as f: | |
33 | f.write(title+'\n') |
|
36 | f.write(title+'\n') | |
34 | f.write('='* len(title)+'\n\n') |
|
37 | f.write('='* len(title)+'\n\n') | |
35 | f.write(data) |
|
38 | f.write(data) | |
36 |
|
39 | |||
37 | if __name__ == '__main__': |
|
40 | if __name__ == '__main__': | |
38 | main() |
|
41 | main() | |
39 |
|
42 | |||
40 |
|
43 | |||
41 |
|
44 | |||
42 |
|
45 | |||
43 |
|
46 |
1 | NO CONTENT: file was removed |
|
NO CONTENT: file was removed |
1 | NO CONTENT: file was removed |
|
NO CONTENT: file was removed |
1 | NO CONTENT: file was removed |
|
NO CONTENT: file was removed |
1 | NO CONTENT: file was removed |
|
NO CONTENT: file was removed |
1 | NO CONTENT: file was removed |
|
NO CONTENT: file was removed |
General Comments 0
You need to be logged in to leave comments.
Login now