forked from damontallen/IPython-quick-ref-sheets
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathHTML_Basic_Help_Table.html
More file actions
84 lines (84 loc) · 6.62 KB
/
HTML_Basic_Help_Table.html
File metadata and controls
84 lines (84 loc) · 6.62 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
<style>
div.Table_0{
left:0%;
width:616px;
margin-left: 10px;
position:absolute;
}
</style>
<style>
div.Table_1{
left:0%;
width:488px;
margin-left: 646px;
position:absolute;
}
</style>
<div id="container" style="height_min=800px;width:1144px">
<div class="Table_0" id="Table0" style="height:auto;min_width:616px;"><table border="1" cellpadding="3" cellspacing="0" style="border:1px solid black;border-collapse:collapse;font-family:verdana;font-size:13px">
<tr><td style="background-color:lightBlue;" colspan="2"; ><b>IPython -- An enhanced Interactive Python - Quick Reference Card</b></td></tr>
<tr><td colspan="2"; > </td></tr>
<tr><td >ipython</td><td>Open IPython terminal console</td></tr>
<tr><td >juypter console</td><td>Open terminal console (4.0 and later)</td></tr>
<tr><td >ipython qtconsole</td><td>Open IPython qtconsole</td></tr>
<tr><td >juptyer qtconsole</td><td>Open qtconsole (4.0 and later)</td></tr>
<tr><td >ipython notebook</td><td>Open IPython Notebook (browser interface)</td></tr>
<tr><td >jupyter notebook</td><td>Open Notebook (browser interface, 4.0 and later)</td></tr>
<tr><td >ipython --help-all</td><td>Show all IPython start flags</td></tr>
<tr><td colspan="2"; > </td></tr>
<tr><td style="background-color:#D5E0C5;" colspan="2"; ><b>Within IPython:</b></td></tr>
<tr><td colspan="2"; > </td></tr>
<tr><td> obj?, obj??<BR>  </td><td> Get help, or more help for object (also works as<BR>?obj, ??obj). </td></tr>
<tr><td >?foo.*abc*</td><td>List names in 'foo' containing 'abc' in them.</td></tr>
<tr><td >%magic</td><td>Information about IPython's 'magic' % functions.</td></tr>
<tr><td colspan="2"; > </td></tr>
<tr><td colspan="2"; >Magic functions are prefixed by % or %%, and typically take their arguments<BR>without parentheses, quotes or even commas for convenience.  Line magics take a<BR>single % and cell magics are prefixed with two %%.</td></tr>
<tr><td colspan="2"; > </td></tr>
<tr><td style="background-color:#D5E0C5;" colspan="2"; ><b>Example magic function calls:</b></td></tr>
<tr><td colspan="2"; > </td></tr>
<tr><td >%alias d ls -F</td><td>'d' is now an alias for 'ls -F'</td></tr>
<tr><td >alias d ls -F</td><td>Works if 'alias' not a python name</td></tr>
<tr><td >alist = %alias</td><td>Get list of aliases to 'alist'</td></tr>
<tr><td >cd /usr/share</td><td>Obvious. cd -<tab> to choose from visited dirs.</td></tr>
<tr><td >%cd??</td><td>See help AND source for magic %cd</td></tr>
<tr><td >%timeit x=10</td><td>time the 'x=10' statement with high precision.</td></tr>
<tr><td> %%timeit x=2**100<BR>x**100 </td><td> time 'x**100' with a setup of 'x=2**100'; setup code is not<BR>counted.  This is an example of a cell magic. </td></tr>
<tr><td colspan="2"; > </td></tr>
</table></div>
<div class="Table_1" id="Table1" style="height:auto;min_width:488px;"><table border="1" cellpadding="3" cellspacing="0" style="border:1px solid black;border-collapse:collapse;font-family:verdana;font-size:13px">
<tr><td style="background-color:#D5E0C5;" colspan="2"; ><b>System commands:</b></td></tr>
<tr><td colspan="2"; > </td></tr>
<tr><td >!cp a.txt b/</td><td>System command escape, calls os.system()</td></tr>
<tr><td >cp a.txt b/</td><td>after %rehashx, most system commands work without !</td></tr>
<tr><td >cp ${f}.txt $bar</td><td>Variable expansion in magics and system commands</td></tr>
<tr><td >files = !ls /usr</td><td>Capture sytem command output</td></tr>
<tr><td >files.s, files.l, files.n</td><td>"a b c", ['a','b','c'], 'a\nb\nc'</td></tr>
<tr><td colspan="2"; > </td></tr>
<tr><td style="background-color:#D5E0C5;" colspan="2"; ><b>History:</b></td></tr>
<tr><td colspan="2"; > </td></tr>
<tr><td >_i, _ii, _iii</td><td>Previous, next previous, next next previous input</td></tr>
<tr><td >_i4, _ih[2:5]</td><td>Input history line 4, lines 2-4</td></tr>
<tr><td >exec _i81</td><td>Execute input history line #81 again</td></tr>
<tr><td >%rep 81</td><td>Edit input history line #81</td></tr>
<tr><td >_, __, ___</td><td>previous, next previous, next next previous output</td></tr>
<tr><td >_dh</td><td>Directory history</td></tr>
<tr><td >_oh</td><td>Output history</td></tr>
<tr><td >%hist</td><td>Command history of current session.</td></tr>
<tr><td >%hist -g foo</td><td>Search command history of (almost) all sessions for 'foo'.</td></tr>
<tr><td >%hist -g</td><td>Command history of (almost) all sessions.</td></tr>
<tr><td >%hist 1/2-8</td><td>Command history containing lines 2-8 of session 1.</td></tr>
<tr><td >%hist 1/ ~2/</td><td>Command history of session 1 and 2 sessions before current.</td></tr>
<tr><td> %hist ~8/1-~6/5<BR>  </td><td> Command history from line 1 of 8 sessions ago to<BR>line 5 of 6 sessions ago. </td></tr>
<tr><td >%edit 0/</td><td>Open editor to execute code with history of current session.</td></tr>
<tr><td colspan="2"; > </td></tr>
<tr><td style="background-color:#D5E0C5;" colspan="2"; ><b>Autocall:</b></td></tr>
<tr><td colspan="2"; > </td></tr>
<tr><td >f 1,2</td><td>f(1,2)  # Off by default, enable with %autocall magic.</td></tr>
<tr><td >/f 1,2</td><td>f(1,2) (forced autoparen)</td></tr>
<tr><td >,f 1 2</td><td>f("1","2")</td></tr>
<tr><td >;f 1 2</td><td>f("1 2")</td></tr>
<tr><td colspan="2"; > </td></tr>
<tr><td colspan="2"; >Remember: TAB completion works in many contexts, not just file names<BR>or python names.</td></tr>
<tr><td colspan="2"; > </td></tr>
</table></div>
</div>