##// END OF EJS Templates
Simplify .py listing code, moving Misc examples.
Brian E. Granger -
Show More
@@ -0,0 +1,6 b''
1 # A simple IPython script that provides Notebook links to .py files in the cwd
2
3 from IPython.display import FileLink, display
4 files =!ls *.py
5 for f in files:
6 display(FileLink(f)) No newline at end of file
@@ -0,0 +1,6 b''
1 # A simple IPython script that lists files in all subdirs
2
3 from IPython.display import FileLinks, display
4 dirs =!ls -d */
5 for d in dirs:
6 display(FileLinks(d)) No newline at end of file
@@ -1,7 +1,7 b''
1 1 {
2 2 "metadata": {
3 3 "name": "",
4 "signature": "sha256:2fc11a62b83396569f64bfde2516a0219a62108a64f920dedb7217a63d67a9bc"
4 "signature": "sha256:a805b2c46cc61ed300cc06162f057e5c2f934cf3df10daa27ca885a1ab74674a"
5 5 },
6 6 "nbformat": 3,
7 7 "nbformat_minor": 0,
@@ -86,20 +86,7 b''
86 86 "cell_type": "code",
87 87 "collapsed": false,
88 88 "input": [
89 "from IPython.display import FileLink, display"
90 ],
91 "language": "python",
92 "metadata": {},
93 "outputs": [],
94 "prompt_number": 1
95 },
96 {
97 "cell_type": "code",
98 "collapsed": false,
99 "input": [
100 "files =!ls *.py\n",
101 "for f in files:\n",
102 " display(FileLink(f))"
89 "%run ../list_pyfiles.ipy"
103 90 ],
104 91 "language": "python",
105 92 "metadata": {},
@@ -1,7 +1,7 b''
1 1 {
2 2 "metadata": {
3 3 "name": "",
4 "signature": "sha256:78b90d18791f32ff5abbbf5b4a9846ad8fad0a46af65125faac15f86f68da57f"
4 "signature": "sha256:29db13dc7016ac387a7b8f535ee31c19456004997ba93c328fa0abae41704e5f"
5 5 },
6 6 "nbformat": 3,
7 7 "nbformat_minor": 0,
@@ -93,20 +93,7 b''
93 93 "cell_type": "code",
94 94 "collapsed": false,
95 95 "input": [
96 "from IPython.display import FileLink, display"
97 ],
98 "language": "python",
99 "metadata": {},
100 "outputs": [],
101 "prompt_number": 2
102 },
103 {
104 "cell_type": "code",
105 "collapsed": false,
106 "input": [
107 "files =!ls *.py\n",
108 "for f in files:\n",
109 " display(FileLink(f))"
96 "%run ../list_pyfiles.ipy"
110 97 ],
111 98 "language": "python",
112 99 "metadata": {},
@@ -192,7 +179,7 b''
192 179 ]
193 180 }
194 181 ],
195 "prompt_number": 3
182 "prompt_number": 1
196 183 }
197 184 ],
198 185 "metadata": {}
@@ -1,7 +1,7 b''
1 1 {
2 2 "metadata": {
3 3 "name": "",
4 "signature": "sha256:178b84c6ec2464bc76d655fb49d06913fcdcac5aad9e3442b6039c219f583e49"
4 "signature": "sha256:481e128e553ec13e039f3e3f5e567cc3caffe391b78b9821ee883fb8770ebc82"
5 5 },
6 6 "nbformat": 3,
7 7 "nbformat_minor": 0,
@@ -9,11 +9,17 b''
9 9 {
10 10 "cells": [
11 11 {
12 "cell_type": "heading",
13 "level": 1,
14 "metadata": {},
15 "source": [
16 "Background Jobs"
17 ]
18 },
19 {
12 20 "cell_type": "markdown",
13 21 "metadata": {},
14 22 "source": [
15 "# Simple interactive bacgkround jobs with IPython\n",
16 "\n",
17 23 "We start by loading the `backgroundjobs` library and defining a few trivial functions to illustrate things with."
18 24 ]
19 25 },
@@ -1,7 +1,7 b''
1 1 {
2 2 "metadata": {
3 3 "name": "",
4 "signature": "sha256:1f73cbd161515fd1a2c4b327925f1f17e45ed057ffb039a22cf833f61154e000"
4 "signature": "sha256:dd3f8171dfb5c8cb7aa9b1c0f5dee915f4ac8f73d9dc19a20a95c8f1583578ae"
5 5 },
6 6 "nbformat": 3,
7 7 "nbformat_minor": 0,
@@ -65,7 +65,7 b''
65 65 "cell_type": "markdown",
66 66 "metadata": {},
67 67 "source": [
68 "Coming soon."
68 "* [Background Jobs](Background Jobs.ipynb)"
69 69 ]
70 70 },
71 71 {
@@ -87,32 +87,72 b''
87 87 "cell_type": "code",
88 88 "collapsed": false,
89 89 "input": [
90 "from IPython.display import FileLink, display"
90 "%run ../list_pyfiles.ipy"
91 91 ],
92 92 "language": "python",
93 93 "metadata": {},
94 "outputs": [],
94 "outputs": [
95 {
96 "html": [
97 "<a href='example-demo.py' target='_blank'>example-demo.py</a><br>"
98 ],
99 "metadata": {},
100 "output_type": "display_data",
101 "text": [
102 "/Users/bgranger/Documents/Computing/IPython/code/ipython/examples/IPython Kernel/example-demo.py"
103 ]
104 },
105 {
106 "html": [
107 "<a href='ipython-get-history.py' target='_blank'>ipython-get-history.py</a><br>"
108 ],
109 "metadata": {},
110 "output_type": "display_data",
111 "text": [
112 "/Users/bgranger/Documents/Computing/IPython/code/ipython/examples/IPython Kernel/ipython-get-history.py"
113 ]
114 }
115 ],
95 116 "prompt_number": 1
96 117 },
97 118 {
119 "cell_type": "markdown",
120 "metadata": {},
121 "source": [
122 "There are also a set of examples that show how to integrate IPython with different GUI event loops:"
123 ]
124 },
125 {
98 126 "cell_type": "code",
99 127 "collapsed": false,
100 128 "input": [
101 "files =!ls *.py\n",
102 "for f in files:\n",
103 " display(FileLink(f))"
129 "%run ../list_subdirs.ipy"
104 130 ],
105 131 "language": "python",
106 132 "metadata": {},
107 133 "outputs": [
108 134 {
109 135 "html": [
110 "<a href='ipython-get-history.py' target='_blank'>ipython-get-history.py</a><br>"
136 "gui/<br>\n",
137 "&nbsp;&nbsp;<a href='gui/gui-glut.py' target='_blank'>gui-glut.py</a><br>\n",
138 "&nbsp;&nbsp;<a href='gui/gui-gtk.py' target='_blank'>gui-gtk.py</a><br>\n",
139 "&nbsp;&nbsp;<a href='gui/gui-gtk3.py' target='_blank'>gui-gtk3.py</a><br>\n",
140 "&nbsp;&nbsp;<a href='gui/gui-pyglet.py' target='_blank'>gui-pyglet.py</a><br>\n",
141 "&nbsp;&nbsp;<a href='gui/gui-qt.py' target='_blank'>gui-qt.py</a><br>\n",
142 "&nbsp;&nbsp;<a href='gui/gui-tk.py' target='_blank'>gui-tk.py</a><br>\n",
143 "&nbsp;&nbsp;<a href='gui/gui-wx.py' target='_blank'>gui-wx.py</a><br>"
111 144 ],
112 145 "metadata": {},
113 146 "output_type": "display_data",
114 147 "text": [
115 "/Users/bgranger/Documents/Computing/IPython/code/ipython/examples/IPython Kernel/ipython-get-history.py"
148 "gui/\n",
149 " gui-glut.py\n",
150 " gui-gtk.py\n",
151 " gui-gtk3.py\n",
152 " gui-pyglet.py\n",
153 " gui-qt.py\n",
154 " gui-tk.py\n",
155 " gui-wx.py"
116 156 ]
117 157 }
118 158 ],
1 NO CONTENT: file renamed from examples/Miscellaneous/example-demo.py to examples/IPython Kernel/example-demo.py
1 NO CONTENT: file renamed from examples/Miscellaneous/gui-glut.py to examples/IPython Kernel/gui/gui-glut.py
1 NO CONTENT: file renamed from examples/Miscellaneous/gui-gtk.py to examples/IPython Kernel/gui/gui-gtk.py
1 NO CONTENT: file renamed from examples/Miscellaneous/gui-gtk3.py to examples/IPython Kernel/gui/gui-gtk3.py
1 NO CONTENT: file renamed from examples/Miscellaneous/gui-pyglet.py to examples/IPython Kernel/gui/gui-pyglet.py
1 NO CONTENT: file renamed from examples/Miscellaneous/gui-qt.py to examples/IPython Kernel/gui/gui-qt.py
1 NO CONTENT: file renamed from examples/Miscellaneous/gui-tk.py to examples/IPython Kernel/gui/gui-tk.py
1 NO CONTENT: file renamed from examples/Miscellaneous/gui-wx.py to examples/IPython Kernel/gui/gui-wx.py
1 NO CONTENT: file renamed from examples/Miscellaneous/ipython-completion.bash to examples/IPython Kernel/ipython-completion.bash
1 NO CONTENT: file renamed from examples/Miscellaneous/ipython-qtconsole.desktop to examples/IPython Kernel/ipython-qtconsole.desktop
1 NO CONTENT: file renamed from examples/Miscellaneous/ipython.desktop to examples/IPython Kernel/ipython.desktop
@@ -1,7 +1,7 b''
1 1 {
2 2 "metadata": {
3 3 "name": "",
4 "signature": "sha256:f047f5edb4201c0c7aa38bdf31058bf6ab2785d53e7a03cdbd4e4ff4217c0007"
4 "signature": "sha256:0b4b631419772e40e0f4893f5a0f0fe089a39e46c8862af0256164628394302d"
5 5 },
6 6 "nbformat": 3,
7 7 "nbformat_minor": 0,
@@ -48,8 +48,7 b''
48 48 "* [Parallel Computing](Parallel Computing/Index.ipynb): IPython's library for interactive parallel computing\n",
49 49 "* [Customization](Customization/Index.ipynb): How to configure IPython and customize it with magics, extensions, etc.\n",
50 50 "* [Embedding](Embedding/Index.ipynb): Embedding and reusing IPython's components into other applications\n",
51 "* [Builtin Extensions](Builtin Extensions/Index.ipynb): Extensions we ship with IPython\n",
52 "* [Miscellaneous](Miscellaneous/Index.ipynb): Documentation that doesn't fit anywhere else"
51 "* [Builtin Extensions](Builtin Extensions/Index.ipynb): Extensions we ship with IPython"
53 52 ]
54 53 }
55 54 ],
@@ -1,7 +1,7 b''
1 1 {
2 2 "metadata": {
3 3 "name": "",
4 "signature": "sha256:24e7c8d3c3d2d4b6e7a5b9d01c7e413b736537327a485e257912943fc013a888"
4 "signature": "sha256:424566387e51dfd0dc559496301c86be9b1f610b6cfedb1cbd225ce9f0161b88"
5 5 },
6 6 "nbformat": 3,
7 7 "nbformat_minor": 0,
@@ -92,27 +92,7 b''
92 92 "cell_type": "code",
93 93 "collapsed": false,
94 94 "input": [
95 "from IPython.display import FileLink, display"
96 ],
97 "language": "python",
98 "metadata": {},
99 "outputs": [],
100 "prompt_number": 7
101 },
102 {
103 "cell_type": "markdown",
104 "metadata": {},
105 "source": [
106 "Here are single file Python examples:"
107 ]
108 },
109 {
110 "cell_type": "code",
111 "collapsed": false,
112 "input": [
113 "files =!ls *.py\n",
114 "for f in files:\n",
115 " display(FileLink(f))"
95 "%run ../list_pyfiles.ipy"
116 96 ],
117 97 "language": "python",
118 98 "metadata": {},
@@ -218,7 +198,7 b''
218 198 ]
219 199 }
220 200 ],
221 "prompt_number": 9
201 "prompt_number": 4
222 202 },
223 203 {
224 204 "cell_type": "markdown",
@@ -231,9 +211,7 b''
231 211 "cell_type": "code",
232 212 "collapsed": false,
233 213 "input": [
234 "files =!ls -d */\n",
235 "for f in files:\n",
236 " display(FileLinks(f))"
214 "%run ../list_subdirs.ipy"
237 215 ],
238 216 "language": "python",
239 217 "metadata": {},
@@ -343,7 +321,7 b''
343 321 ]
344 322 }
345 323 ],
346 "prompt_number": 13
324 "prompt_number": 3
347 325 }
348 326 ],
349 327 "metadata": {}
1 NO CONTENT: file was removed
General Comments 0
You need to be logged in to leave comments. Login now