Show More
@@ -1,228 +1,229 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 | ON_RTD = os.environ.get('READTHEDOCS', None) == 'True' |
|
20 | ON_RTD = os.environ.get('READTHEDOCS', None) == 'True' | |
21 |
|
21 | |||
22 | if ON_RTD: |
|
22 | if ON_RTD: | |
23 | # Mock the presence of matplotlib, which we don't have on RTD |
|
23 | # Mock the presence of matplotlib, which we don't have on RTD | |
24 | # see |
|
24 | # see | |
25 | # http://read-the-docs.readthedocs.org/en/latest/faq.html |
|
25 | # http://read-the-docs.readthedocs.org/en/latest/faq.html | |
26 | tags.add('rtd') |
|
26 | tags.add('rtd') | |
27 |
|
27 | |||
28 | # If your extensions are in another directory, add it here. If the directory |
|
28 | # If your extensions are in another directory, add it here. If the directory | |
29 | # is relative to the documentation root, use os.path.abspath to make it |
|
29 | # is relative to the documentation root, use os.path.abspath to make it | |
30 | # absolute, like shown here. |
|
30 | # absolute, like shown here. | |
31 | sys.path.insert(0, os.path.abspath('../sphinxext')) |
|
31 | sys.path.insert(0, os.path.abspath('../sphinxext')) | |
32 |
|
32 | |||
33 | # Import support for ipython console session syntax highlighting |
|
33 | # Import support for ipython console session syntax highlighting | |
34 | # (lives IPython's sphinxext subpackage) |
|
34 | # (lives IPython's sphinxext subpackage) | |
35 | from IPython.sphinxext import ipython_console_highlighting |
|
35 | from IPython.sphinxext import ipython_console_highlighting | |
36 |
|
36 | |||
37 | # We load the ipython release info into a dict by explicit execution |
|
37 | # We load the ipython release info into a dict by explicit execution | |
38 | iprelease = {} |
|
38 | iprelease = {} | |
39 | execfile('../../IPython/core/release.py',iprelease) |
|
39 | execfile('../../IPython/core/release.py',iprelease) | |
40 |
|
40 | |||
41 | # General configuration |
|
41 | # General configuration | |
42 | # --------------------- |
|
42 | # --------------------- | |
43 |
|
43 | |||
44 | # Add any Sphinx extension module names here, as strings. They can be extensions |
|
44 | # Add any Sphinx extension module names here, as strings. They can be extensions | |
45 | # coming with Sphinx (named 'sphinx.ext.*') or your custom ones. |
|
45 | # coming with Sphinx (named 'sphinx.ext.*') or your custom ones. | |
46 | extensions = [ |
|
46 | extensions = [ | |
47 | 'matplotlib.sphinxext.mathmpl', |
|
47 | 'matplotlib.sphinxext.mathmpl', | |
48 | 'matplotlib.sphinxext.only_directives', |
|
48 | 'matplotlib.sphinxext.only_directives', | |
49 | 'matplotlib.sphinxext.plot_directive', |
|
49 | 'matplotlib.sphinxext.plot_directive', | |
50 | 'sphinx.ext.autodoc', |
|
50 | 'sphinx.ext.autodoc', | |
51 | 'sphinx.ext.doctest', |
|
51 | 'sphinx.ext.doctest', | |
52 | 'sphinx.ext.inheritance_diagram', |
|
52 | 'sphinx.ext.inheritance_diagram', | |
53 | 'IPython.sphinxext.ipython_console_highlighting', |
|
53 | 'IPython.sphinxext.ipython_console_highlighting', | |
54 | 'IPython.sphinxext.ipython_directive', |
|
54 | 'IPython.sphinxext.ipython_directive', | |
55 | 'numpydoc', # to preprocess docstrings |
|
55 | 'numpydoc', # to preprocess docstrings | |
56 | 'github', # for easy GitHub links |
|
56 | 'github', # for easy GitHub links | |
57 | ] |
|
57 | ] | |
58 |
|
58 | |||
59 | if ON_RTD: |
|
59 | if ON_RTD: | |
60 | # Remove extensions not currently supported on RTD |
|
60 | # Remove extensions not currently supported on RTD | |
61 | extensions.remove('matplotlib.sphinxext.only_directives') |
|
61 | extensions.remove('matplotlib.sphinxext.only_directives') | |
62 | extensions.remove('matplotlib.sphinxext.mathmpl') |
|
62 | extensions.remove('matplotlib.sphinxext.mathmpl') | |
63 | extensions.remove('matplotlib.sphinxext.plot_directive') |
|
63 | extensions.remove('matplotlib.sphinxext.plot_directive') | |
64 | extensions.remove('IPython.sphinxext.ipython_directive') |
|
64 | extensions.remove('IPython.sphinxext.ipython_directive') | |
65 |
|
65 | |||
66 | # Add any paths that contain templates here, relative to this directory. |
|
66 | # Add any paths that contain templates here, relative to this directory. | |
67 | templates_path = ['_templates'] |
|
67 | templates_path = ['_templates'] | |
68 |
|
68 | |||
69 | # The suffix of source filenames. |
|
69 | # The suffix of source filenames. | |
70 | source_suffix = '.rst' |
|
70 | source_suffix = '.rst' | |
71 |
|
71 | |||
72 | # The master toctree document. |
|
72 | # The master toctree document. | |
73 | master_doc = 'index' |
|
73 | master_doc = 'index' | |
74 |
|
74 | |||
75 | # General substitutions. |
|
75 | # General substitutions. | |
76 | project = 'IPython' |
|
76 | project = 'IPython' | |
77 | copyright = '2008, The IPython Development Team' |
|
77 | copyright = '2008, The IPython Development Team' | |
78 |
|
78 | |||
79 | # ghissue config |
|
79 | # ghissue config | |
80 | github_project_url = "https://github.com/ipython/ipython" |
|
80 | github_project_url = "https://github.com/ipython/ipython" | |
81 |
|
81 | |||
82 | # The default replacements for |version| and |release|, also used in various |
|
82 | # The default replacements for |version| and |release|, also used in various | |
83 | # other places throughout the built documents. |
|
83 | # other places throughout the built documents. | |
84 | # |
|
84 | # | |
85 | # The full version, including alpha/beta/rc tags. |
|
85 | # The full version, including alpha/beta/rc tags. | |
86 |
|
|
86 | codename = iprelease['codename'] | |
87 | # The short X.Y version. |
|
87 | release = "%s: %s" % (iprelease['version'], codename) | |
88 | version = '.'.join(release.split('.',2)[:2]) |
|
88 | # Just the X.Y.Z part, no '-dev' | |
|
89 | version = iprelease['version'].split('-', 1)[0] | |||
89 |
|
90 | |||
90 |
|
91 | |||
91 | # There are two options for replacing |today|: either, you set today to some |
|
92 | # There are two options for replacing |today|: either, you set today to some | |
92 | # non-false value, then it is used: |
|
93 | # non-false value, then it is used: | |
93 | #today = '' |
|
94 | #today = '' | |
94 | # Else, today_fmt is used as the format for a strftime call. |
|
95 | # Else, today_fmt is used as the format for a strftime call. | |
95 | today_fmt = '%B %d, %Y' |
|
96 | today_fmt = '%B %d, %Y' | |
96 |
|
97 | |||
97 | # List of documents that shouldn't be included in the build. |
|
98 | # List of documents that shouldn't be included in the build. | |
98 | #unused_docs = [] |
|
99 | #unused_docs = [] | |
99 |
|
100 | |||
100 | # List of directories, relative to source directories, that shouldn't be searched |
|
101 | # List of directories, relative to source directories, that shouldn't be searched | |
101 | # for source files. |
|
102 | # for source files. | |
102 | exclude_dirs = ['attic'] |
|
103 | exclude_dirs = ['attic'] | |
103 |
|
104 | |||
104 | # If true, '()' will be appended to :func: etc. cross-reference text. |
|
105 | # If true, '()' will be appended to :func: etc. cross-reference text. | |
105 | #add_function_parentheses = True |
|
106 | #add_function_parentheses = True | |
106 |
|
107 | |||
107 | # If true, the current module name will be prepended to all description |
|
108 | # If true, the current module name will be prepended to all description | |
108 | # unit titles (such as .. function::). |
|
109 | # unit titles (such as .. function::). | |
109 | #add_module_names = True |
|
110 | #add_module_names = True | |
110 |
|
111 | |||
111 | # If true, sectionauthor and moduleauthor directives will be shown in the |
|
112 | # If true, sectionauthor and moduleauthor directives will be shown in the | |
112 | # output. They are ignored by default. |
|
113 | # output. They are ignored by default. | |
113 | #show_authors = False |
|
114 | #show_authors = False | |
114 |
|
115 | |||
115 | # The name of the Pygments (syntax highlighting) style to use. |
|
116 | # The name of the Pygments (syntax highlighting) style to use. | |
116 | pygments_style = 'sphinx' |
|
117 | pygments_style = 'sphinx' | |
117 |
|
118 | |||
118 |
|
119 | |||
119 | # Options for HTML output |
|
120 | # Options for HTML output | |
120 | # ----------------------- |
|
121 | # ----------------------- | |
121 |
|
122 | |||
122 | # The style sheet to use for HTML and HTML Help pages. A file of that name |
|
123 | # The style sheet to use for HTML and HTML Help pages. A file of that name | |
123 | # must exist either in Sphinx' static/ path, or in one of the custom paths |
|
124 | # must exist either in Sphinx' static/ path, or in one of the custom paths | |
124 | # given in html_static_path. |
|
125 | # given in html_static_path. | |
125 | html_style = 'default.css' |
|
126 | html_style = 'default.css' | |
126 |
|
127 | |||
127 | # The name for this set of Sphinx documents. If None, it defaults to |
|
128 | # The name for this set of Sphinx documents. If None, it defaults to | |
128 | # "<project> v<release> documentation". |
|
129 | # "<project> v<release> documentation". | |
129 | #html_title = None |
|
130 | #html_title = None | |
130 |
|
131 | |||
131 | # The name of an image file (within the static path) to place at the top of |
|
132 | # The name of an image file (within the static path) to place at the top of | |
132 | # the sidebar. |
|
133 | # the sidebar. | |
133 | #html_logo = None |
|
134 | #html_logo = None | |
134 |
|
135 | |||
135 | # Add any paths that contain custom static files (such as style sheets) here, |
|
136 | # Add any paths that contain custom static files (such as style sheets) here, | |
136 | # relative to this directory. They are copied after the builtin static files, |
|
137 | # relative to this directory. They are copied after the builtin static files, | |
137 | # so a file named "default.css" will overwrite the builtin "default.css". |
|
138 | # so a file named "default.css" will overwrite the builtin "default.css". | |
138 | html_static_path = ['_static'] |
|
139 | html_static_path = ['_static'] | |
139 |
|
140 | |||
140 | # If not '', a 'Last updated on:' timestamp is inserted at every page bottom, |
|
141 | # If not '', a 'Last updated on:' timestamp is inserted at every page bottom, | |
141 | # using the given strftime format. |
|
142 | # using the given strftime format. | |
142 | html_last_updated_fmt = '%b %d, %Y' |
|
143 | html_last_updated_fmt = '%b %d, %Y' | |
143 |
|
144 | |||
144 | # If true, SmartyPants will be used to convert quotes and dashes to |
|
145 | # If true, SmartyPants will be used to convert quotes and dashes to | |
145 | # typographically correct entities. |
|
146 | # typographically correct entities. | |
146 | #html_use_smartypants = True |
|
147 | #html_use_smartypants = True | |
147 |
|
148 | |||
148 | # Custom sidebar templates, maps document names to template names. |
|
149 | # Custom sidebar templates, maps document names to template names. | |
149 | #html_sidebars = {} |
|
150 | #html_sidebars = {} | |
150 |
|
151 | |||
151 | # Additional templates that should be rendered to pages, maps page names to |
|
152 | # Additional templates that should be rendered to pages, maps page names to | |
152 | # template names. |
|
153 | # template names. | |
153 | #html_additional_pages = {} |
|
154 | #html_additional_pages = {} | |
154 |
|
155 | |||
155 | # If false, no module index is generated. |
|
156 | # If false, no module index is generated. | |
156 | #html_use_modindex = True |
|
157 | #html_use_modindex = True | |
157 |
|
158 | |||
158 | # If true, the reST sources are included in the HTML build as _sources/<name>. |
|
159 | # If true, the reST sources are included in the HTML build as _sources/<name>. | |
159 | #html_copy_source = True |
|
160 | #html_copy_source = True | |
160 |
|
161 | |||
161 | # If true, an OpenSearch description file will be output, and all pages will |
|
162 | # If true, an OpenSearch description file will be output, and all pages will | |
162 | # contain a <link> tag referring to it. The value of this option must be the |
|
163 | # contain a <link> tag referring to it. The value of this option must be the | |
163 | # base URL from which the finished HTML is served. |
|
164 | # base URL from which the finished HTML is served. | |
164 | #html_use_opensearch = '' |
|
165 | #html_use_opensearch = '' | |
165 |
|
166 | |||
166 | # If nonempty, this is the file name suffix for HTML files (e.g. ".xhtml"). |
|
167 | # If nonempty, this is the file name suffix for HTML files (e.g. ".xhtml"). | |
167 | #html_file_suffix = '' |
|
168 | #html_file_suffix = '' | |
168 |
|
169 | |||
169 | # Output file base name for HTML help builder. |
|
170 | # Output file base name for HTML help builder. | |
170 | htmlhelp_basename = 'ipythondoc' |
|
171 | htmlhelp_basename = 'ipythondoc' | |
171 |
|
172 | |||
172 |
|
173 | |||
173 | # Options for LaTeX output |
|
174 | # Options for LaTeX output | |
174 | # ------------------------ |
|
175 | # ------------------------ | |
175 |
|
176 | |||
176 | # The paper size ('letter' or 'a4'). |
|
177 | # The paper size ('letter' or 'a4'). | |
177 | latex_paper_size = 'letter' |
|
178 | latex_paper_size = 'letter' | |
178 |
|
179 | |||
179 | # The font size ('10pt', '11pt' or '12pt'). |
|
180 | # The font size ('10pt', '11pt' or '12pt'). | |
180 | latex_font_size = '11pt' |
|
181 | latex_font_size = '11pt' | |
181 |
|
182 | |||
182 | # Grouping the document tree into LaTeX files. List of tuples |
|
183 | # Grouping the document tree into LaTeX files. List of tuples | |
183 | # (source start file, target name, title, author, document class [howto/manual]). |
|
184 | # (source start file, target name, title, author, document class [howto/manual]). | |
184 |
|
185 | |||
185 | latex_documents = [ |
|
186 | latex_documents = [ | |
186 | ('index', 'ipython.tex', 'IPython Documentation', |
|
187 | ('index', 'ipython.tex', 'IPython Documentation', | |
187 | ur"""The IPython Development Team""", 'manual', True), |
|
188 | ur"""The IPython Development Team""", 'manual', True), | |
188 | ('parallel/winhpc_index', 'winhpc_whitepaper.tex', |
|
189 | ('parallel/winhpc_index', 'winhpc_whitepaper.tex', | |
189 | 'Using IPython on Windows HPC Server 2008', |
|
190 | 'Using IPython on Windows HPC Server 2008', | |
190 | ur"Brian E. Granger", 'manual', True) |
|
191 | ur"Brian E. Granger", 'manual', True) | |
191 | ] |
|
192 | ] | |
192 |
|
193 | |||
193 | # The name of an image file (relative to this directory) to place at the top of |
|
194 | # The name of an image file (relative to this directory) to place at the top of | |
194 | # the title page. |
|
195 | # the title page. | |
195 | #latex_logo = None |
|
196 | #latex_logo = None | |
196 |
|
197 | |||
197 | # For "manual" documents, if this is true, then toplevel headings are parts, |
|
198 | # For "manual" documents, if this is true, then toplevel headings are parts, | |
198 | # not chapters. |
|
199 | # not chapters. | |
199 | #latex_use_parts = False |
|
200 | #latex_use_parts = False | |
200 |
|
201 | |||
201 | # Additional stuff for the LaTeX preamble. |
|
202 | # Additional stuff for the LaTeX preamble. | |
202 | #latex_preamble = '' |
|
203 | #latex_preamble = '' | |
203 |
|
204 | |||
204 | # Documents to append as an appendix to all manuals. |
|
205 | # Documents to append as an appendix to all manuals. | |
205 | #latex_appendices = [] |
|
206 | #latex_appendices = [] | |
206 |
|
207 | |||
207 | # If false, no module index is generated. |
|
208 | # If false, no module index is generated. | |
208 | latex_use_modindex = True |
|
209 | latex_use_modindex = True | |
209 |
|
210 | |||
210 |
|
211 | |||
211 | # Options for texinfo output |
|
212 | # Options for texinfo output | |
212 | # -------------------------- |
|
213 | # -------------------------- | |
213 |
|
214 | |||
214 | texinfo_documents = [ |
|
215 | texinfo_documents = [ | |
215 | (master_doc, 'ipython', 'IPython Documentation', |
|
216 | (master_doc, 'ipython', 'IPython Documentation', | |
216 | 'The IPython Development Team', |
|
217 | 'The IPython Development Team', | |
217 | 'IPython', |
|
218 | 'IPython', | |
218 | 'IPython Documentation', |
|
219 | 'IPython Documentation', | |
219 | 'Programming', |
|
220 | 'Programming', | |
220 | 1), |
|
221 | 1), | |
221 | ] |
|
222 | ] | |
222 |
|
223 | |||
223 |
|
224 | |||
224 | # Cleanup |
|
225 | # Cleanup | |
225 | # ------- |
|
226 | # ------- | |
226 | # delete release info to avoid pickling errors from sphinx |
|
227 | # delete release info to avoid pickling errors from sphinx | |
227 |
|
228 | |||
228 | del iprelease |
|
229 | del iprelease |
@@ -1,287 +1,288 b'' | |||||
1 | ============ |
|
1 | ============ | |
2 | 1.0 Series |
|
2 | 1.0 Series | |
3 | ============ |
|
3 | ============ | |
4 |
|
4 | |||
5 | Release 1.0 |
|
5 | Release 1.0.0: An Afternoon Hack | |
6 | =========== |
|
6 | ================================ | |
|
7 | ||||
7 |
|
8 | |||
8 | IPython 1.0 requires Python β₯ 2.6.5 or β₯ 3.2.1. |
|
9 | IPython 1.0 requires Python β₯ 2.6.5 or β₯ 3.2.1. | |
9 | It does not support Python 3.0, 3.1, or 2.5. |
|
10 | It does not support Python 3.0, 3.1, or 2.5. | |
10 |
|
11 | |||
11 | This is a big release. The principal milestone is the addition of :mod:`IPython.nbconvert`, |
|
12 | This is a big release. The principal milestone is the addition of :mod:`IPython.nbconvert`, | |
12 | but there has been a great deal of work improving all parts of IPython as well. |
|
13 | but there has been a great deal of work improving all parts of IPython as well. | |
13 |
|
14 | |||
14 | The previous version (0.13) was released on June 30, 2012, |
|
15 | The previous version (0.13) was released on June 30, 2012, | |
15 | and in this development cycle we had: |
|
16 | and in this development cycle we had: | |
16 |
|
17 | |||
17 | - ~12 months of work. |
|
18 | - ~12 months of work. | |
18 | - ~700 pull requests merged. |
|
19 | - ~700 pull requests merged. | |
19 | - ~600 issues closed (non-pull requests). |
|
20 | - ~600 issues closed (non-pull requests). | |
20 | - contributions from ~150 authors. |
|
21 | - contributions from ~150 authors. | |
21 | - ~4000 commits. |
|
22 | - ~4000 commits. | |
22 |
|
23 | |||
23 | The amount of work included in this release is so large that we can only cover |
|
24 | The amount of work included in this release is so large that we can only cover | |
24 | here the main highlights; please see our :ref:`detailed release statistics |
|
25 | here the main highlights; please see our :ref:`detailed release statistics | |
25 | <issues_list_100>` for links to every issue and pull request closed on GitHub |
|
26 | <issues_list_100>` for links to every issue and pull request closed on GitHub | |
26 | as well as a full list of individual contributors. |
|
27 | as well as a full list of individual contributors. | |
27 | It includes |
|
28 | It includes | |
28 |
|
29 | |||
29 | Reorganization |
|
30 | Reorganization | |
30 | -------------- |
|
31 | -------------- | |
31 |
|
32 | |||
32 | There have been two major reorganizations in IPython 1.0: |
|
33 | There have been two major reorganizations in IPython 1.0: | |
33 |
|
34 | |||
34 | - Added :mod:`IPython.kernel` for all kernel-related code. |
|
35 | - Added :mod:`IPython.kernel` for all kernel-related code. | |
35 | This means that :mod:`IPython.zmq` has been removed, |
|
36 | This means that :mod:`IPython.zmq` has been removed, | |
36 | and much of it is now in :mod:`IPython.kernel.zmq`, |
|
37 | and much of it is now in :mod:`IPython.kernel.zmq`, | |
37 | some of it being in the top-level :mod:`IPython.kernel`. |
|
38 | some of it being in the top-level :mod:`IPython.kernel`. | |
38 | - We have removed the `frontend` subpackage, |
|
39 | - We have removed the `frontend` subpackage, | |
39 | as it caused unnecessary depth. So what was :mod:`IPython.frontend.qt` |
|
40 | as it caused unnecessary depth. So what was :mod:`IPython.frontend.qt` | |
40 | is now :mod:`IPython.qt`, and so on. The one difference is that |
|
41 | is now :mod:`IPython.qt`, and so on. The one difference is that | |
41 | the notebook has been further flattened, so that |
|
42 | the notebook has been further flattened, so that | |
42 | :mod:`IPython.frontend.html.notebook` is now just `IPython.html`. |
|
43 | :mod:`IPython.frontend.html.notebook` is now just `IPython.html`. | |
43 | There is a shim module, so :mod:`IPython.frontend` is still |
|
44 | There is a shim module, so :mod:`IPython.frontend` is still | |
44 | importable in 1.0, but there will be a warning. |
|
45 | importable in 1.0, but there will be a warning. | |
45 | - The IPython sphinx directives are now installed in :mod:`IPython.sphinx`, |
|
46 | - The IPython sphinx directives are now installed in :mod:`IPython.sphinx`, | |
46 | so they can be imported by other projects. |
|
47 | so they can be imported by other projects. | |
47 |
|
48 | |||
48 |
|
49 | |||
49 | Public APIs |
|
50 | Public APIs | |
50 | ----------- |
|
51 | ----------- | |
51 |
|
52 | |||
52 | For the first time since 0.10 (sorry, everyone), |
|
53 | For the first time since 0.10 (sorry, everyone), | |
53 | there is an official public API for starting IPython: |
|
54 | there is an official public API for starting IPython: | |
54 |
|
55 | |||
55 | .. sourcecode:: python |
|
56 | .. sourcecode:: python | |
56 |
|
57 | |||
57 | from IPython import start_ipython |
|
58 | from IPython import start_ipython | |
58 | start_ipython() |
|
59 | start_ipython() | |
59 |
|
60 | |||
60 | This is what packages should use that start their own IPython session, |
|
61 | This is what packages should use that start their own IPython session, | |
61 | but don't actually want embedded IPython (most cases). |
|
62 | but don't actually want embedded IPython (most cases). | |
62 |
|
63 | |||
63 | We also have added: |
|
64 | We also have added: | |
64 |
|
65 | |||
65 | .. sourcecode:: python |
|
66 | .. sourcecode:: python | |
66 |
|
67 | |||
67 | from IPython import get_ipython |
|
68 | from IPython import get_ipython | |
68 |
|
69 | |||
69 |
|
70 | |||
70 | Which is a *library* function for getting the current IPython instance, |
|
71 | Which is a *library* function for getting the current IPython instance, | |
71 | and will return ``None`` if no IPython instance is running. |
|
72 | and will return ``None`` if no IPython instance is running. | |
72 | This is the official way to check whether your code is called from inside an IPython session. |
|
73 | This is the official way to check whether your code is called from inside an IPython session. | |
73 | If you want to check for IPython without unnecessarily importing IPython, |
|
74 | If you want to check for IPython without unnecessarily importing IPython, | |
74 | use this function: |
|
75 | use this function: | |
75 |
|
76 | |||
76 | .. sourcecode:: python |
|
77 | .. sourcecode:: python | |
77 |
|
78 | |||
78 | def get_ipython(): |
|
79 | def get_ipython(): | |
79 | """return IPython instance if there is one, None otherwise""" |
|
80 | """return IPython instance if there is one, None otherwise""" | |
80 | import sys |
|
81 | import sys | |
81 | if "IPython" in sys.modules: |
|
82 | if "IPython" in sys.modules: | |
82 | import IPython |
|
83 | import IPython | |
83 | return IPython.get_ipython() |
|
84 | return IPython.get_ipython() | |
84 |
|
85 | |||
85 | Core |
|
86 | Core | |
86 | ---- |
|
87 | ---- | |
87 |
|
88 | |||
88 | - The input transformation framework has been reworked. This fixes some corner |
|
89 | - The input transformation framework has been reworked. This fixes some corner | |
89 | cases, and adds more flexibility for projects which use IPython, like SymPy & |
|
90 | cases, and adds more flexibility for projects which use IPython, like SymPy & | |
90 | SAGE. For more details, see :doc:`/config/inputtransforms`. |
|
91 | SAGE. For more details, see :doc:`/config/inputtransforms`. | |
91 | - Exception types can now be displayed with a custom traceback, by defining a |
|
92 | - Exception types can now be displayed with a custom traceback, by defining a | |
92 | ``_render_traceback_()`` method which returns a list of strings, each |
|
93 | ``_render_traceback_()`` method which returns a list of strings, each | |
93 | containing one line of the traceback. |
|
94 | containing one line of the traceback. | |
94 | - A new command, ``ipython history trim`` can be used to delete everything but |
|
95 | - A new command, ``ipython history trim`` can be used to delete everything but | |
95 | the last 1000 entries in the history database. |
|
96 | the last 1000 entries in the history database. | |
96 | - ``__file__`` is defined in both config files at load time, |
|
97 | - ``__file__`` is defined in both config files at load time, | |
97 | and ``.ipy`` files executed with ``%run``. |
|
98 | and ``.ipy`` files executed with ``%run``. | |
98 | - ``%logstart`` and ``%logappend`` are no longer broken. |
|
99 | - ``%logstart`` and ``%logappend`` are no longer broken. | |
99 | - Add glob expansion for ``%run``, e.g. ``%run -g script.py *.txt``. |
|
100 | - Add glob expansion for ``%run``, e.g. ``%run -g script.py *.txt``. | |
100 | - Expand variables (``$foo``) in Cell Magic argument line. |
|
101 | - Expand variables (``$foo``) in Cell Magic argument line. | |
101 | - By default, :command:`iptest` will exclude various slow tests. |
|
102 | - By default, :command:`iptest` will exclude various slow tests. | |
102 | All tests can be run with :command:`iptest --all`. |
|
103 | All tests can be run with :command:`iptest --all`. | |
103 | - SQLite history can be disabled in the various cases that it does not behave well. |
|
104 | - SQLite history can be disabled in the various cases that it does not behave well. | |
104 | - ``%edit`` works on interactively defined variables. |
|
105 | - ``%edit`` works on interactively defined variables. | |
105 | - editor hooks have been restored from quarantine, enabling TextMate as editor, |
|
106 | - editor hooks have been restored from quarantine, enabling TextMate as editor, | |
106 | etc. |
|
107 | etc. | |
107 | - The env variable PYTHONSTARTUP is respected by IPython. |
|
108 | - The env variable PYTHONSTARTUP is respected by IPython. | |
108 | - A ``%matplotlib`` magic is added, which is like the old ``%pylab`` magic, |
|
109 | - A ``%matplotlib`` magic is added, which is like the old ``%pylab`` magic, | |
109 | but it does not import anything to the interactive namespace. |
|
110 | but it does not import anything to the interactive namespace. | |
110 | It is recommended that users switch to ``%matplotlib`` and explicit imports. |
|
111 | It is recommended that users switch to ``%matplotlib`` and explicit imports. | |
111 |
|
112 | |||
112 |
|
113 | |||
113 | Backwards incompatible changes |
|
114 | Backwards incompatible changes | |
114 | ****************************** |
|
115 | ****************************** | |
115 |
|
116 | |||
116 | - Calling :meth:`InteractiveShell.prefilter` will no longer perform static |
|
117 | - Calling :meth:`InteractiveShell.prefilter` will no longer perform static | |
117 | transformations - the processing of escaped commands such as ``%magic`` and |
|
118 | transformations - the processing of escaped commands such as ``%magic`` and | |
118 | ``!system``, and stripping input prompts from code blocks. This functionality |
|
119 | ``!system``, and stripping input prompts from code blocks. This functionality | |
119 | was duplicated in :mod:`IPython.core.inputsplitter`, and the latter version |
|
120 | was duplicated in :mod:`IPython.core.inputsplitter`, and the latter version | |
120 | was already what IPython relied on. A new API to transform input will be ready |
|
121 | was already what IPython relied on. A new API to transform input will be ready | |
121 | before release. |
|
122 | before release. | |
122 | - Functions from :mod:`IPython.lib.inputhook` to control integration with GUI |
|
123 | - Functions from :mod:`IPython.lib.inputhook` to control integration with GUI | |
123 | event loops are no longer exposed in the top level of :mod:`IPython.lib`. |
|
124 | event loops are no longer exposed in the top level of :mod:`IPython.lib`. | |
124 | Code calling these should make sure to import them from |
|
125 | Code calling these should make sure to import them from | |
125 | :mod:`IPython.lib.inputhook`. |
|
126 | :mod:`IPython.lib.inputhook`. | |
126 | - For all kernel managers, the ``sub_channel`` attribute has been renamed to |
|
127 | - For all kernel managers, the ``sub_channel`` attribute has been renamed to | |
127 | ``iopub_channel``. |
|
128 | ``iopub_channel``. | |
128 | - Users on Python versions before 2.6.6, 2.7.1 or 3.2 will now need to call |
|
129 | - Users on Python versions before 2.6.6, 2.7.1 or 3.2 will now need to call | |
129 | :func:`IPython.utils.doctestreload.doctest_reload` to make doctests run |
|
130 | :func:`IPython.utils.doctestreload.doctest_reload` to make doctests run | |
130 | correctly inside IPython. Python releases since those versions are unaffected. |
|
131 | correctly inside IPython. Python releases since those versions are unaffected. | |
131 | For details, see :ghpull:`3068` and `Python issue 8048 <http://bugs.python.org/issue8048>`_. |
|
132 | For details, see :ghpull:`3068` and `Python issue 8048 <http://bugs.python.org/issue8048>`_. | |
132 | - The ``InteractiveShell.cache_main_mod()`` method has been removed, and |
|
133 | - The ``InteractiveShell.cache_main_mod()`` method has been removed, and | |
133 | :meth:`~IPython.core.interactiveshell.InteractiveShell.new_main_mod` has a |
|
134 | :meth:`~IPython.core.interactiveshell.InteractiveShell.new_main_mod` has a | |
134 | different signature, expecting a filename where earlier versions expected |
|
135 | different signature, expecting a filename where earlier versions expected | |
135 | a namespace. See :ghpull:`3555` for details. |
|
136 | a namespace. See :ghpull:`3555` for details. | |
136 | - The short-lived plugin system has been removed. Extensions are the way to go. |
|
137 | - The short-lived plugin system has been removed. Extensions are the way to go. | |
137 |
|
138 | |||
138 |
|
139 | |||
139 | NbConvert |
|
140 | NbConvert | |
140 | --------- |
|
141 | --------- | |
141 |
|
142 | |||
142 | The major milestone for IPython 1.0 is the addition of :mod:`IPython.nbconvert` - tools for converting |
|
143 | The major milestone for IPython 1.0 is the addition of :mod:`IPython.nbconvert` - tools for converting | |
143 | IPython notebooks to various other formats. |
|
144 | IPython notebooks to various other formats. | |
144 |
|
145 | |||
145 | .. warning:: |
|
146 | .. warning:: | |
146 |
|
147 | |||
147 | nbconvert is Ξ±-level preview code in 1.0 |
|
148 | nbconvert is Ξ±-level preview code in 1.0 | |
148 |
|
149 | |||
149 | To use nbconvert to convert various file formats:: |
|
150 | To use nbconvert to convert various file formats:: | |
150 |
|
151 | |||
151 | ipython nbconvert --format full_html *.ipynb |
|
152 | ipython nbconvert --format full_html *.ipynb | |
152 |
|
153 | |||
153 | See ``ipython nbconvert --help`` for more information. |
|
154 | See ``ipython nbconvert --help`` for more information. | |
154 | nbconvert depends on `pandoc`_ for many of the translations to and from various formats. |
|
155 | nbconvert depends on `pandoc`_ for many of the translations to and from various formats. | |
155 |
|
156 | |||
156 | .. _pandoc: http://johnmacfarlane.net/pandoc/ |
|
157 | .. _pandoc: http://johnmacfarlane.net/pandoc/ | |
157 |
|
158 | |||
158 | Notebook |
|
159 | Notebook | |
159 | -------- |
|
160 | -------- | |
160 |
|
161 | |||
161 | Major changes to the IPython Notebook in 1.0: |
|
162 | Major changes to the IPython Notebook in 1.0: | |
162 |
|
163 | |||
163 | - The notebook is now autosaved, by default at an interval of two minutes. |
|
164 | - The notebook is now autosaved, by default at an interval of two minutes. | |
164 | When you press 'save' or Ctrl-S, a *checkpoint* is made, in a hidden folder. |
|
165 | When you press 'save' or Ctrl-S, a *checkpoint* is made, in a hidden folder. | |
165 | This checkpoint can be restored, so that the autosave model is strictly safer |
|
166 | This checkpoint can be restored, so that the autosave model is strictly safer | |
166 | than traditional save. If you change nothing about your save habits, |
|
167 | than traditional save. If you change nothing about your save habits, | |
167 | you will always have a checkpoint that you have written, |
|
168 | you will always have a checkpoint that you have written, | |
168 | and an autosaved file that is kept up to date. |
|
169 | and an autosaved file that is kept up to date. | |
169 | - You can load custom javascript and CSS in the notebook by editing the files |
|
170 | - You can load custom javascript and CSS in the notebook by editing the files | |
170 | :file:`$(ipython locate profile)/static/custom/custom.{js,css}`. |
|
171 | :file:`$(ipython locate profile)/static/custom/custom.{js,css}`. | |
171 | - Add ``%%html``, ``%%svg``, ``%%javascript``, and ``%%latex`` cell magics |
|
172 | - Add ``%%html``, ``%%svg``, ``%%javascript``, and ``%%latex`` cell magics | |
172 | for writing raw output in notebook cells. |
|
173 | for writing raw output in notebook cells. | |
173 | - add a redirect handler and anchors on heading cells, so you can link |
|
174 | - add a redirect handler and anchors on heading cells, so you can link | |
174 | across notebooks, directly to heading cells in other notebooks. |
|
175 | across notebooks, directly to heading cells in other notebooks. | |
175 | - Images support width and height metadata, |
|
176 | - Images support width and height metadata, | |
176 | and thereby 2x scaling (retina support). |
|
177 | and thereby 2x scaling (retina support). | |
177 | - ``_repr_foo_`` methods can return a tuple of (data, metadata), |
|
178 | - ``_repr_foo_`` methods can return a tuple of (data, metadata), | |
178 | where metadata is a dict containing metadata about the displayed object. |
|
179 | where metadata is a dict containing metadata about the displayed object. | |
179 | This is used to set size, etc. for retina graphics. To enable retina matplotlib figures, |
|
180 | This is used to set size, etc. for retina graphics. To enable retina matplotlib figures, | |
180 | simply set ``InlineBackend.figure_format = 'retina'`` for 2x PNG figures. |
|
181 | simply set ``InlineBackend.figure_format = 'retina'`` for 2x PNG figures. | |
181 | - Add display.FileLink and FileLinks for quickly displaying HTML links to local files. |
|
182 | - Add display.FileLink and FileLinks for quickly displaying HTML links to local files. | |
182 | - Cells have metadata, which can be edited via cell toolbars. |
|
183 | - Cells have metadata, which can be edited via cell toolbars. | |
183 | This metadata can be used by external code (e.g. reveal.js or exporters), |
|
184 | This metadata can be used by external code (e.g. reveal.js or exporters), | |
184 | when examining the notebook. |
|
185 | when examining the notebook. | |
185 | - Fix an issue parsing LaTeX in markdown cells, which required users to type ``\\\``, |
|
186 | - Fix an issue parsing LaTeX in markdown cells, which required users to type ``\\\``, | |
186 | instead of ``\\``. |
|
187 | instead of ``\\``. | |
187 | - Notebook templates are rendered with Jinja instead of Tornado. |
|
188 | - Notebook templates are rendered with Jinja instead of Tornado. | |
188 | - ``%%file`` has been renamed ``%%writefile`` (``%%file``) is deprecated. |
|
189 | - ``%%file`` has been renamed ``%%writefile`` (``%%file``) is deprecated. | |
189 | - ANSI (and VT100) color parsing has been improved in both performance and |
|
190 | - ANSI (and VT100) color parsing has been improved in both performance and | |
190 | supported values. |
|
191 | supported values. | |
191 | - The static files path can be found as ``IPython.html.DEFAULT_STATIC_FILES_PATH``, |
|
192 | - The static files path can be found as ``IPython.html.DEFAULT_STATIC_FILES_PATH``, | |
192 | which may be changed by package managers. |
|
193 | which may be changed by package managers. | |
193 | - The notebook supports :func:`raw_input`, and thus also ``%debug``. |
|
194 | - The notebook supports :func:`raw_input`, and thus also ``%debug``. | |
194 | - IPython's CSS is installed in :file:`static/css/style.min.css` |
|
195 | - IPython's CSS is installed in :file:`static/css/style.min.css` | |
195 | (all style, including bootstrap), and :file:`static/css/ipython.min.css`, |
|
196 | (all style, including bootstrap), and :file:`static/css/ipython.min.css`, | |
196 | which only has IPython's own CSS. The latter file should be useful for embedding |
|
197 | which only has IPython's own CSS. The latter file should be useful for embedding | |
197 | IPython notebooks in other pages, blogs, etc. |
|
198 | IPython notebooks in other pages, blogs, etc. | |
198 |
|
199 | |||
199 | Javascript Components |
|
200 | Javascript Components | |
200 | ********************* |
|
201 | ********************* | |
201 |
|
202 | |||
202 | The javascript components used in the notebook have been updated significantly. |
|
203 | The javascript components used in the notebook have been updated significantly. | |
203 |
|
204 | |||
204 | - updates to jQuery (2.0) and jQueryUI (1.10) |
|
205 | - updates to jQuery (2.0) and jQueryUI (1.10) | |
205 | - Update CodeMirror to 3.14 |
|
206 | - Update CodeMirror to 3.14 | |
206 | - Twitter Bootstrap (2.3) for layout |
|
207 | - Twitter Bootstrap (2.3) for layout | |
207 | - Font-Awesome (3.1) for icons |
|
208 | - Font-Awesome (3.1) for icons | |
208 | - highlight.js (7.3) for syntax highlighting |
|
209 | - highlight.js (7.3) for syntax highlighting | |
209 | - marked (0.2.8) for markdown rendering |
|
210 | - marked (0.2.8) for markdown rendering | |
210 | - require.js (2.1) for loading javascript |
|
211 | - require.js (2.1) for loading javascript | |
211 |
|
212 | |||
212 | Some relevant changes that are results of this: |
|
213 | Some relevant changes that are results of this: | |
213 |
|
214 | |||
214 | - Markdown cells now support GitHub-flavored Markdown (GFM), |
|
215 | - Markdown cells now support GitHub-flavored Markdown (GFM), | |
215 | which includes ``\`\`\`python`` code blocks and tables. |
|
216 | which includes ``\`\`\`python`` code blocks and tables. | |
216 | - Notebook UI behaves better on more screen sizes. |
|
217 | - Notebook UI behaves better on more screen sizes. | |
217 | - Various code cell input issues have been fixed. |
|
218 | - Various code cell input issues have been fixed. | |
218 |
|
219 | |||
219 |
|
220 | |||
220 | Kernel |
|
221 | Kernel | |
221 | ------ |
|
222 | ------ | |
222 |
|
223 | |||
223 | The kernel code has been substantially reorganized. |
|
224 | The kernel code has been substantially reorganized. | |
224 |
|
225 | |||
225 | New features in the kernel: |
|
226 | New features in the kernel: | |
226 |
|
227 | |||
227 | - Kernels support ZeroMQ IPC transport, not just TCP |
|
228 | - Kernels support ZeroMQ IPC transport, not just TCP | |
228 | - The message protocol has added a top-level metadata field, |
|
229 | - The message protocol has added a top-level metadata field, | |
229 | used for information about messages. |
|
230 | used for information about messages. | |
230 | - Add a `data_pub` message that functions much like `display_pub`, |
|
231 | - Add a `data_pub` message that functions much like `display_pub`, | |
231 | but publishes raw (usually pickled) data, rather than representations. |
|
232 | but publishes raw (usually pickled) data, rather than representations. | |
232 | - Ensure that ``sys.stdout.encoding`` is defined in Kernels. |
|
233 | - Ensure that ``sys.stdout.encoding`` is defined in Kernels. | |
233 | - Stdout from forked subprocesses should be forwarded to frontends (instead of crashing). |
|
234 | - Stdout from forked subprocesses should be forwarded to frontends (instead of crashing). | |
234 |
|
235 | |||
235 | IPEP 13 |
|
236 | IPEP 13 | |
236 | ******* |
|
237 | ******* | |
237 |
|
238 | |||
238 | The KernelManager has been split into a :class:`~.KernelManager` and a :class:`~.KernelClient`. |
|
239 | The KernelManager has been split into a :class:`~.KernelManager` and a :class:`~.KernelClient`. | |
239 | The Manager owns a kernel and starts / signals / restarts it. There is always zero or one |
|
240 | The Manager owns a kernel and starts / signals / restarts it. There is always zero or one | |
240 | KernelManager per Kernel. Clients communicate with Kernels via zmq channels, |
|
241 | KernelManager per Kernel. Clients communicate with Kernels via zmq channels, | |
241 | and there can be zero-to-many Clients connected to a Kernel at any given time. |
|
242 | and there can be zero-to-many Clients connected to a Kernel at any given time. | |
242 |
|
243 | |||
243 | The KernelManager now automatically restarts the kernel when it dies, |
|
244 | The KernelManager now automatically restarts the kernel when it dies, | |
244 | rather than requiring user input at the notebook or QtConsole UI |
|
245 | rather than requiring user input at the notebook or QtConsole UI | |
245 | (which may or may not exist at restart time). |
|
246 | (which may or may not exist at restart time). | |
246 |
|
247 | |||
247 | In-process kernels |
|
248 | In-process kernels | |
248 | ****************** |
|
249 | ****************** | |
249 |
|
250 | |||
250 | The Python-language frontends, particularly the Qt console, may now communicate |
|
251 | The Python-language frontends, particularly the Qt console, may now communicate | |
251 | with in-process kernels, in addition to the traditional out-of-process |
|
252 | with in-process kernels, in addition to the traditional out-of-process | |
252 | kernels. An in-process kernel permits direct access to the kernel namespace, |
|
253 | kernels. An in-process kernel permits direct access to the kernel namespace, | |
253 | which is necessary in some applications. It should be understood, however, that |
|
254 | which is necessary in some applications. It should be understood, however, that | |
254 | the in-process kernel is not robust to bad user input and will block the main |
|
255 | the in-process kernel is not robust to bad user input and will block the main | |
255 | (GUI) thread while executing. Developers must decide on a case-by-case basis |
|
256 | (GUI) thread while executing. Developers must decide on a case-by-case basis | |
256 | whether this tradeoff is appropriate for their application. |
|
257 | whether this tradeoff is appropriate for their application. | |
257 |
|
258 | |||
258 |
|
259 | |||
259 |
|
260 | |||
260 | Parallel |
|
261 | Parallel | |
261 | -------- |
|
262 | -------- | |
262 |
|
263 | |||
263 | IPython.parallel has had some refactoring as well. |
|
264 | IPython.parallel has had some refactoring as well. | |
264 | There are many improvements and fixes, but these are the major changes: |
|
265 | There are many improvements and fixes, but these are the major changes: | |
265 |
|
266 | |||
266 | - Connections have been simplified. All ports and the serialization in use |
|
267 | - Connections have been simplified. All ports and the serialization in use | |
267 | are written to the connection file, rather than the initial two-stage system. |
|
268 | are written to the connection file, rather than the initial two-stage system. | |
268 | - Serialization has been rewritten, fixing many bugs and dramatically improving |
|
269 | - Serialization has been rewritten, fixing many bugs and dramatically improving | |
269 | performance serializing large containers. |
|
270 | performance serializing large containers. | |
270 | - Load-balancing scheduler performance with large numbers of tasks has been dramatically improved. |
|
271 | - Load-balancing scheduler performance with large numbers of tasks has been dramatically improved. | |
271 | - There should be fewer (hopefully zero) false-positives for engine failures. |
|
272 | - There should be fewer (hopefully zero) false-positives for engine failures. | |
272 | - Increased compatibility with various use cases that produced serialization / argument errors |
|
273 | - Increased compatibility with various use cases that produced serialization / argument errors | |
273 | with map, etc. |
|
274 | with map, etc. | |
274 | - The controller can attempt to resume operation if it has crashed, |
|
275 | - The controller can attempt to resume operation if it has crashed, | |
275 | by passing ``ipcontroller --restore``. |
|
276 | by passing ``ipcontroller --restore``. | |
276 | - Engines can monitor the Hub heartbeat, and shutdown if the Hub disappears for too long. |
|
277 | - Engines can monitor the Hub heartbeat, and shutdown if the Hub disappears for too long. | |
277 | - add HTCondor support in launchers |
|
278 | - add HTCondor support in launchers | |
278 |
|
279 | |||
279 |
|
280 | |||
280 | QtConsole |
|
281 | QtConsole | |
281 | --------- |
|
282 | --------- | |
282 |
|
283 | |||
283 | Various fixes, including improved performance with lots of text output, |
|
284 | Various fixes, including improved performance with lots of text output, | |
284 | and better drag and drop support. |
|
285 | and better drag and drop support. | |
285 | The initial window size of the qtconsole is now configurable via ``IPythonWidget.width`` |
|
286 | The initial window size of the qtconsole is now configurable via ``IPythonWidget.width`` | |
286 | and ``IPythonWidget.height``. |
|
287 | and ``IPythonWidget.height``. | |
287 |
|
288 |
General Comments 0
You need to be logged in to leave comments.
Login now