File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 9696 "metadata" : {},
9797 "outputs" : []
9898 },
99- {
100- "cell_type" : " markdown" ,
101- "metadata" : {},
102- "source" : [
103- " Then start up IPython with the ``--pylab`` option to enable easy plotting"
104- ]
105- },
10699 {
107100 "cell_type" : " heading" ,
108101 "level" : 2 ,
285278 " defined is in the search path [more about python modules and the search path](http://docs.python.org/2/tutorial/modules.html)."
286279 ]
287280 },
288- {
289- "cell_type" : " markdown" ,
290- "metadata" : {},
291- "source" : [
292- " You can also define a function on the interactive interpreter by just\n " ,
293- " typing it line by line. However, \n " ,
294- " if you work in an interactive session, then the function ends as soon as there\n " ,
295- " is a blank line. This makes it a little inconvenient to copy and paste more\n " ,
296- " than the simplest functions into an interpreter.\n " ,
297- " Fortunately, ipython offers two magic functions that take care of this\n " ,
298- " \n " ,
299- " 1) You can mark code in some editor, copy it to the clipboard and then\n " ,
300- " type ``%paste`` in ipython.\n " ,
301- " 2) You type ``%cpaste`` in ipython you can paste code (e.g. with the\n " ,
302- " mouse) and ipython will correct the leading number of white spaces and\n " ,
303- " ignore empty lines.\n " ,
304- " \n " ,
305- " These two tricks can be used with any type of code, but are particularly useful\n " ,
306- " to define functions."
307- ]
308- },
309281 {
310282 "cell_type" : " markdown" ,
311283 "metadata" : {},
You can’t perform that action at this time.
0 commit comments