Show More
The requested changes are too big and content was truncated. Show full diff
@@ -0,0 +1,4 b'' | |||||
|
1 | import os | |||
|
2 | def oscmd(c): | |||
|
3 | os.system(c) | |||
|
4 | oscmd('sphinx-build -d build/doctrees source build/html') No newline at end of file |
@@ -0,0 +1,132 b'' | |||||
|
1 | # -*- coding: utf-8 -*- | |||
|
2 | # | |||
|
3 | # IPython documentation build configuration file, created by | |||
|
4 | # sphinx-quickstart.py on Sat Mar 29 15:36:13 2008. | |||
|
5 | # | |||
|
6 | # This file is execfile()d with the current directory set to its containing dir. | |||
|
7 | # | |||
|
8 | # The contents of this file are pickled, so don't put values in the namespace | |||
|
9 | # that aren't pickleable (module imports are okay, they're removed automatically). | |||
|
10 | # | |||
|
11 | # All configuration values have a default value; values that are commented out | |||
|
12 | # serve to show the default value. | |||
|
13 | ||||
|
14 | import sys | |||
|
15 | ||||
|
16 | # If your extensions are in another directory, add it here. | |||
|
17 | #sys.path.append('some/directory') | |||
|
18 | ||||
|
19 | # General configuration | |||
|
20 | # --------------------- | |||
|
21 | ||||
|
22 | # Add any Sphinx extension module names here, as strings. They can be extensions | |||
|
23 | # coming with Sphinx (named 'sphinx.addons.*') or your custom ones. | |||
|
24 | #extensions = [] | |||
|
25 | ||||
|
26 | # Add any paths that contain templates here, relative to this directory. | |||
|
27 | templates_path = ['_templates'] | |||
|
28 | ||||
|
29 | # The suffix of source filenames. | |||
|
30 | source_suffix = '.rst' | |||
|
31 | ||||
|
32 | # The master toctree document. | |||
|
33 | master_doc = 'ipython' | |||
|
34 | ||||
|
35 | # General substitutions. | |||
|
36 | project = 'IPython' | |||
|
37 | copyright = '2008, IPython team' | |||
|
38 | ||||
|
39 | # The default replacements for |version| and |release|, also used in various | |||
|
40 | # other places throughout the built documents. | |||
|
41 | # | |||
|
42 | # The short X.Y version. | |||
|
43 | version = '0.8.3' | |||
|
44 | # The full version, including alpha/beta/rc tags. | |||
|
45 | release = '0.8.3' | |||
|
46 | ||||
|
47 | # There are two options for replacing |today|: either, you set today to some | |||
|
48 | # non-false value, then it is used: | |||
|
49 | #today = '' | |||
|
50 | # Else, today_fmt is used as the format for a strftime call. | |||
|
51 | today_fmt = '%B %d, %Y' | |||
|
52 | ||||
|
53 | # List of documents that shouldn't be included in the build. | |||
|
54 | #unused_docs = [] | |||
|
55 | ||||
|
56 | # If true, '()' will be appended to :func: etc. cross-reference text. | |||
|
57 | #add_function_parentheses = True | |||
|
58 | ||||
|
59 | # If true, the current module name will be prepended to all description | |||
|
60 | # unit titles (such as .. function::). | |||
|
61 | #add_module_names = True | |||
|
62 | ||||
|
63 | # If true, sectionauthor and moduleauthor directives will be shown in the | |||
|
64 | # output. They are ignored by default. | |||
|
65 | #show_authors = False | |||
|
66 | ||||
|
67 | # The name of the Pygments (syntax highlighting) style to use. | |||
|
68 | pygments_style = 'sphinx' | |||
|
69 | ||||
|
70 | ||||
|
71 | # Options for HTML output | |||
|
72 | # ----------------------- | |||
|
73 | ||||
|
74 | # The style sheet to use for HTML and HTML Help pages. A file of that name | |||
|
75 | # must exist either in Sphinx' static/ path, or in one of the custom paths | |||
|
76 | # given in html_static_path. | |||
|
77 | html_style = 'default.css' | |||
|
78 | ||||
|
79 | # Add any paths that contain custom static files (such as style sheets) here, | |||
|
80 | # relative to this directory. They are copied after the builtin static files, | |||
|
81 | # so a file named "default.css" will overwrite the builtin "default.css". | |||
|
82 | html_static_path = ['_static'] | |||
|
83 | ||||
|
84 | # If not '', a 'Last updated on:' timestamp is inserted at every page bottom, | |||
|
85 | # using the given strftime format. | |||
|
86 | html_last_updated_fmt = '%b %d, %Y' | |||
|
87 | ||||
|
88 | # If true, SmartyPants will be used to convert quotes and dashes to | |||
|
89 | # typographically correct entities. | |||
|
90 | #html_use_smartypants = True | |||
|
91 | ||||
|
92 | # Content template for the index page. | |||
|
93 | #html_index = '' | |||
|
94 | ||||
|
95 | # Custom sidebar templates, maps document names to template names. | |||
|
96 | #html_sidebars = {} | |||
|
97 | ||||
|
98 | # Additional templates that should be rendered to pages, maps page names to | |||
|
99 | # template names. | |||
|
100 | #html_additional_pages = {} | |||
|
101 | ||||
|
102 | # If false, no module index is generated. | |||
|
103 | #html_use_modindex = True | |||
|
104 | ||||
|
105 | # If true, the reST sources are included in the HTML build as _sources/<name>. | |||
|
106 | #html_copy_source = True | |||
|
107 | ||||
|
108 | # Output file base name for HTML help builder. | |||
|
109 | htmlhelp_basename = 'IPythondoc' | |||
|
110 | ||||
|
111 | ||||
|
112 | # Options for LaTeX output | |||
|
113 | # ------------------------ | |||
|
114 | ||||
|
115 | # The paper size ('letter' or 'a4'). | |||
|
116 | #latex_paper_size = 'letter' | |||
|
117 | ||||
|
118 | # The font size ('10pt', '11pt' or '12pt'). | |||
|
119 | #latex_font_size = '10pt' | |||
|
120 | ||||
|
121 | # Grouping the document tree into LaTeX files. List of tuples | |||
|
122 | # (source start file, target name, title, author, document class [howto/manual]). | |||
|
123 | #latex_documents = [] | |||
|
124 | ||||
|
125 | # Additional stuff for the LaTeX preamble. | |||
|
126 | #latex_preamble = '' | |||
|
127 | ||||
|
128 | # Documents to append as an appendix to all manuals. | |||
|
129 | #latex_appendices = [] | |||
|
130 | ||||
|
131 | # If false, no module index is generated. | |||
|
132 | #latex_use_modindex = True |
@@ -373,8 +373,7 b' def push_ipython_script(node):' | |||||
373 | ohist = ip.IP.output_hist |
|
373 | ohist = ip.IP.output_hist | |
374 | hstart = len(ip.IP.input_hist) |
|
374 | hstart = len(ip.IP.input_hist) | |
375 | script = node.script() |
|
375 | script = node.script() | |
376 |
|
376 | |||
377 | script = g.splitLines(script + '\n') |
|
|||
378 | ip.user_ns['_p'] = node |
|
377 | ip.user_ns['_p'] = node | |
379 | ip.runlines(script) |
|
378 | ip.runlines(script) | |
380 | ip.user_ns.pop('_p',None) |
|
379 | ip.user_ns.pop('_p',None) |
@@ -273,16 +273,27 b' class IPApi:' | |||||
273 | """ |
|
273 | """ | |
274 | res = [] |
|
274 | res = [] | |
275 | lines = script.splitlines() |
|
275 | lines = script.splitlines() | |
|
276 | ||||
276 | level = 0 |
|
277 | level = 0 | |
277 | for l in lines: |
|
278 | for l in lines: | |
278 | lstripped = l.lstrip() |
|
279 | lstripped = l.lstrip() | |
279 | stripped = l.strip() |
|
280 | stripped = l.strip() | |
280 | if not stripped: |
|
281 | if not stripped: | |
281 | continue |
|
282 | continue | |
282 | newlevel = len(l) - len(lstripped) |
|
283 | newlevel = len(l) - len(lstripped) | |
283 | if level > 0 and newlevel == 0 and not stripped.endswith(':'): |
|
284 | def is_secondary_block_start(s): | |
|
285 | if not s.endswith(':'): | |||
|
286 | return False | |||
|
287 | if (s.startswith('elif') or | |||
|
288 | s.startswith('else') or | |||
|
289 | s.startswith('except') or | |||
|
290 | s.startswith('finally')): | |||
|
291 | return True | |||
|
292 | ||||
|
293 | if level > 0 and newlevel == 0 and not is_secondary_block_start(stripped): | |||
284 | # add empty line |
|
294 | # add empty line | |
285 | res.append('') |
|
295 | res.append('') | |
|
296 | ||||
286 | res.append(l) |
|
297 | res.append(l) | |
287 | level = newlevel |
|
298 | level = newlevel | |
288 | return '\n'.join(res) + '\n' |
|
299 | return '\n'.join(res) + '\n' | |
@@ -292,7 +303,7 b' class IPApi:' | |||||
292 | else: |
|
303 | else: | |
293 | script = '\n'.join(lines) |
|
304 | script = '\n'.join(lines) | |
294 | clean=cleanup_ipy_script(script) |
|
305 | clean=cleanup_ipy_script(script) | |
295 |
|
306 | # print "_ip.runlines() script:\n",clean #dbg | ||
296 | self.IP.runlines(clean) |
|
307 | self.IP.runlines(clean) | |
297 | def to_user_ns(self,vars, interactive = True): |
|
308 | def to_user_ns(self,vars, interactive = True): | |
298 | """Inject a group of variables into the IPython user namespace. |
|
309 | """Inject a group of variables into the IPython user namespace. |
@@ -210,7 +210,7 b" object? -> Details about 'object'. ?object also works, ?? prints more." | |||||
210 | editor = '0', |
|
210 | editor = '0', | |
211 | gthread = 0, |
|
211 | gthread = 0, | |
212 | help = 0, |
|
212 | help = 0, | |
213 |
interact = |
|
213 | interact = 0, | |
214 | ipythondir = ipythondir_def, |
|
214 | ipythondir = ipythondir_def, | |
215 | log = 0, |
|
215 | log = 0, | |
216 | logfile = '', |
|
216 | logfile = '', |
@@ -3,7 +3,7 b'' | |||||
3 | <leo_file> |
|
3 | <leo_file> | |
4 | <leo_header file_format="2" tnodes="0" max_tnode_index="0" clone_windows="0"/> |
|
4 | <leo_header file_format="2" tnodes="0" max_tnode_index="0" clone_windows="0"/> | |
5 | <globals body_outline_ratio="0.307814992026"> |
|
5 | <globals body_outline_ratio="0.307814992026"> | |
6 |
<global_window_position top=" |
|
6 | <global_window_position top="257" left="131" height="627" width="1280"/> | |
7 | <global_log_window_position top="0" left="0" height="0" width="0"/> |
|
7 | <global_log_window_position top="0" left="0" height="0" width="0"/> | |
8 | </globals> |
|
8 | </globals> | |
9 | <preferences/> |
|
9 | <preferences/> | |
@@ -38,18 +38,18 b'' | |||||
38 | <v t="vivainio.20080219230342"><vh>slist to leo</vh></v> |
|
38 | <v t="vivainio.20080219230342"><vh>slist to leo</vh></v> | |
39 | </v> |
|
39 | </v> | |
40 | </v> |
|
40 | </v> | |
41 | <v t="vivainio.20080218195413"><vh>Class tests</vh> |
|
41 | <v t="vivainio.20080218195413" a="E"><vh>Class tests</vh> | |
42 | <v t="vivainio.20080218200509"><vh>csvr</vh></v> |
|
42 | <v t="vivainio.20080218200509"><vh>csvr</vh></v> | |
43 | <v t="vivainio.20080218191007"><vh>tempfile</vh></v> |
|
43 | <v t="vivainio.20080218191007"><vh>tempfile</vh></v> | |
44 | <v t="vivainio.20080218195413.1"><vh>rfile</vh></v> |
|
44 | <v t="vivainio.20080218195413.1"><vh>rfile</vh></v> | |
45 | <v t="vivainio.20080219225804"><vh>strlist</vh></v> |
|
45 | <v t="vivainio.20080219225804"><vh>strlist</vh></v> | |
46 | </v> |
|
46 | </v> | |
|
47 | <v t="vivainio.20080222201226" a="V"><vh>IPython script push tests</vh></v> | |||
47 | <v t="vivainio.20080218201219" a="E"><vh>Direct variables</vh> |
|
48 | <v t="vivainio.20080218201219" a="E"><vh>Direct variables</vh> | |
48 | <v t="vivainio.20080222201226"><vh>NewHeadline</vh></v> |
|
|||
49 | <v t="vivainio.20080218201219.2"><vh>bar</vh></v> |
|
49 | <v t="vivainio.20080218201219.2"><vh>bar</vh></v> | |
50 | </v> |
|
50 | </v> | |
51 | <v t="vivainio.20080316144536" a="E"><vh>pylab tests</vh> |
|
51 | <v t="vivainio.20080316144536" a="E"><vh>pylab tests</vh> | |
52 |
<v t="vivainio.20080316145539.2" |
|
52 | <v t="vivainio.20080316145539.2"><vh>Generate testarr</vh></v> | |
53 | <v t="vivainio.20080316085925"><vh>testarr</vh></v> |
|
53 | <v t="vivainio.20080316085925"><vh>testarr</vh></v> | |
54 | <v t="vivainio.20080316085950"><vh>Call plotter on testarr</vh></v> |
|
54 | <v t="vivainio.20080316085950"><vh>Call plotter on testarr</vh></v> | |
55 | </v> |
|
55 | </v> | |
@@ -128,21 +128,45 b' def format_slist(obj):' | |||||
128 | <t tx="vivainio.20080222193236">?</t> |
|
128 | <t tx="vivainio.20080222193236">?</t> | |
129 | <t tx="vivainio.20080222193236.1">@wrap |
|
129 | <t tx="vivainio.20080222193236.1">@wrap | |
130 | @nocolor</t> |
|
130 | @nocolor</t> | |
131 | <t tx="vivainio.20080222201226">1+2 |
|
131 | <t tx="vivainio.20080222201226"># test ipython script 'cleanup' with complex blocks | |
|
132 | 1+2 | |||
132 | print "hello" |
|
133 | print "hello" | |
133 | 3+4 |
|
134 | 3+4 | |
134 |
|
135 | |||
135 | def f(x): |
|
136 | def f(x): | |
136 | return x.upper() |
|
137 | return x.upper() | |
137 |
|
138 | |||
138 | f('hello world') |
|
|||
139 |
|
139 | |||
140 | if 0: |
|
140 | if 0: | |
141 | print "foo" |
|
141 | print "foo" | |
142 | else: |
|
142 | else: | |
143 | print "bar" |
|
143 | print "bar" | |
144 |
|
144 | |||
145 | </t> |
|
145 | def g(): | |
|
146 | pass | |||
|
147 | ||||
|
148 | g() | |||
|
149 | ||||
|
150 | if 1: | |||
|
151 | if 1: | |||
|
152 | print "hello" | |||
|
153 | ||||
|
154 | print "world" | |||
|
155 | ||||
|
156 | if 1: | |||
|
157 | print "hello" | |||
|
158 | ||||
|
159 | print "word" | |||
|
160 | else: | |||
|
161 | print "foo" | |||
|
162 | ||||
|
163 | print "bar" | |||
|
164 | print "baz" | |||
|
165 | ||||
|
166 | try: | |||
|
167 | raise Exception | |||
|
168 | except: | |||
|
169 | print "exc ok"</t> | |||
146 | <t tx="vivainio.20080222202211"></t> |
|
170 | <t tx="vivainio.20080222202211"></t> | |
147 | <t tx="vivainio.20080222202211.1" ipython="7d71005506636f6f7264737101284b0c4bde747102732e">@cl rfile |
|
171 | <t tx="vivainio.20080222202211.1" ipython="7d71005506636f6f7264737101284b0c4bde747102732e">@cl rfile | |
148 | hello |
|
172 | hello |
1 | NO CONTENT: file renamed from doc/ipython.rst to doc/source/ipython.rst |
|
NO CONTENT: file renamed from doc/ipython.rst to doc/source/ipython.rst | ||
The requested commit or file is too big and content was truncated. Show full diff |
General Comments 0
You need to be logged in to leave comments.
Login now