File tree Expand file tree Collapse file tree 4 files changed +169
-189
lines changed
Expand file tree Collapse file tree 4 files changed +169
-189
lines changed Original file line number Diff line number Diff line change 44 "cell_type" : " markdown" ,
55 "metadata" : {},
66 "source" : [
7- " # Simple I/O Loop Examples"
7+ " # Simple I/O Loop Examples for Python 3.4 "
88 ]
99 },
1010 {
1717 {
1818 "cell_type" : " code" ,
1919 "execution_count" : 1 ,
20- "metadata" : {},
20+ "metadata" : {
21+ "collapsed" : true
22+ },
2123 "outputs" : [],
2224 "source" : [
2325 " import asyncio\n " ,
3436 {
3537 "cell_type" : " code" ,
3638 "execution_count" : 2 ,
37- "metadata" : {},
39+ "metadata" : {
40+ "collapsed" : false
41+ },
3842 "outputs" : [
3943 {
4044 "name" : " stdout" ,
6771 {
6872 "cell_type" : " code" ,
6973 "execution_count" : 3 ,
70- "metadata" : {},
74+ "metadata" : {
75+ "collapsed" : false
76+ },
7177 "outputs" : [
7278 {
7379 "name" : " stdout" ,
96102 {
97103 "cell_type" : " code" ,
98104 "execution_count" : 1 ,
99- "metadata" : {},
105+ "metadata" : {
106+ "collapsed" : false
107+ },
100108 "outputs" : [
101109 {
102110 "ename" : " NameError" ,
125133 " \n " ,
126134 " # wrap the coro in a special Future (a Task) and schedule it\n " ,
127135 " loop.create_task(slow_operation(future))\n " ,
128- " # or use\n " ,
129- " # asyncio.async(slow_operation(future))\n " ,
136+ " # could use asyncio.async, but this is deprecated\n " ,
130137 " \n " ,
131138 " loop.run_forever()"
132139 ]
141148 {
142149 "cell_type" : " code" ,
143150 "execution_count" : 5 ,
144- "metadata" : {},
151+ "metadata" : {
152+ "collapsed" : false
153+ },
145154 "outputs" : [
146155 {
147156 "name" : " stdout" ,
173182 "language_info" : {
174183 "codemirror_mode" : {
175184 "name" : " ipython" ,
176- "version" : 3.0
185+ "version" : 3
177186 },
178187 "file_extension" : " .py" ,
179188 "mimetype" : " text/x-python" ,
180189 "name" : " python" ,
181190 "nbconvert_exporter" : " python" ,
182191 "pygments_lexer" : " ipython3" ,
183- "version" : " 3.4.3 "
192+ "version" : " 3.5.0 "
184193 }
185194 },
186195 "nbformat" : 4 ,
187196 "nbformat_minor" : 0
188- }
197+ }
Original file line number Diff line number Diff line change 44 "cell_type" : " markdown" ,
55 "metadata" : {},
66 "source" : [
7- " # Simple I/O Loop Examples"
7+ " # Simple I/O Loop Examples for Python 3.5 "
88 ]
99 },
1010 {
1717 {
1818 "cell_type" : " code" ,
1919 "execution_count" : 7 ,
20- "metadata" : {},
20+ "metadata" : {
21+ "collapsed" : true
22+ },
2123 "outputs" : [],
2224 "source" : [
2325 " import asyncio\n " ,
3436 {
3537 "cell_type" : " code" ,
3638 "execution_count" : 8 ,
37- "metadata" : {},
39+ "metadata" : {
40+ "collapsed" : false
41+ },
3842 "outputs" : [
3943 {
4044 "name" : " stdout" ,
6367 {
6468 "cell_type" : " code" ,
6569 "execution_count" : 15 ,
66- "metadata" : {},
70+ "metadata" : {
71+ "collapsed" : false
72+ },
6773 "outputs" : [
6874 {
6975 "name" : " stdout" ,
7985 ]
8086 },
8187 "execution_count" : 15 ,
82- "output_type " : " execute_result " ,
83- "metadata " : {}
88+ "metadata " : {} ,
89+ "output_type " : " execute_result "
8490 }
8591 ],
8692 "source" : [
102108 {
103109 "cell_type" : " code" ,
104110 "execution_count" : 16 ,
105- "metadata" : {},
111+ "metadata" : {
112+ "collapsed" : false
113+ },
106114 "outputs" : [
107115 {
108116 "name" : " stdout" ,
109117 "output_type" : " stream" ,
110118 "text" : [
111- " Hello World!\n Hello World!\n "
119+ " Hello World!\n " ,
120+ " Hello World!\n "
112121 ]
113122 },
114123 {
118127 ]
119128 },
120129 "execution_count" : 16 ,
121- "output_type " : " execute_result " ,
122- "metadata " : {}
130+ "metadata " : {} ,
131+ "output_type " : " execute_result "
123132 }
124133 ],
125134 "source" : [
138147 {
139148 "cell_type" : " code" ,
140149 "execution_count" : 13 ,
141- "metadata" : {},
150+ "metadata" : {
151+ "collapsed" : false
152+ },
142153 "outputs" : [
143154 {
144155 "name" : " stdout" ,
156167 {
157168 "cell_type" : " markdown" ,
158169 "metadata" : {},
159- "source" : [
160- " "
161- ]
170+ "source" : []
162171 }
163172 ],
164173 "metadata" : {
170179 "language_info" : {
171180 "codemirror_mode" : {
172181 "name" : " ipython" ,
173- "version" : 3.0
182+ "version" : 3
174183 },
175184 "file_extension" : " .py" ,
176185 "mimetype" : " text/x-python" ,
177186 "name" : " python" ,
178187 "nbconvert_exporter" : " python" ,
179188 "pygments_lexer" : " ipython3" ,
180- "version" : " 3.4.3 "
189+ "version" : " 3.5.0 "
181190 }
182191 },
183192 "nbformat" : 4 ,
184193 "nbformat_minor" : 0
185- }
194+ }
You can’t perform that action at this time.
0 commit comments