|
299 | 299 | "cell_type": "code", |
300 | 300 | "collapsed": false, |
301 | 301 | "input": [ |
302 | | - "%debug \n", |
303 | 302 | "def some_func():\n", |
304 | 303 | " var = 'hello world'\n", |
305 | 304 | " for i in range(5):\n", |
|
309 | 308 | ], |
310 | 309 | "language": "python", |
311 | 310 | "metadata": {}, |
| 311 | + "outputs": [], |
| 312 | + "prompt_number": 1 |
| 313 | + }, |
| 314 | + { |
| 315 | + "cell_type": "code", |
| 316 | + "collapsed": false, |
| 317 | + "input": [ |
| 318 | + "%debug\n", |
| 319 | + "some_func()" |
| 320 | + ], |
| 321 | + "language": "python", |
| 322 | + "metadata": {}, |
312 | 323 | "outputs": [ |
313 | 324 | { |
314 | 325 | "output_type": "stream", |
|
320 | 331 | "\u001b[0m\u001b[0;32m 6 \u001b[0;31m \u001b[0;32mreturn\u001b[0m \u001b[0;34m'finished'\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", |
321 | 332 | "\u001b[0m\n" |
322 | 333 | ] |
323 | | - }, |
324 | | - { |
325 | | - "name": "stdout", |
326 | | - "output_type": "stream", |
327 | | - "stream": "stdout", |
328 | | - "text": [ |
329 | | - "ipdb> var\n" |
330 | | - ] |
331 | | - }, |
332 | | - { |
333 | | - "output_type": "stream", |
334 | | - "stream": "stdout", |
335 | | - "text": [ |
336 | | - "'hello world'\n" |
337 | | - ] |
338 | 334 | } |
339 | 335 | ] |
340 | 336 | }, |
|
858 | 854 | ], |
859 | 855 | "prompt_number": 55 |
860 | 856 | }, |
| 857 | + { |
| 858 | + "cell_type": "code", |
| 859 | + "collapsed": false, |
| 860 | + "input": [ |
| 861 | + "def hello_world():\n", |
| 862 | + " \"\"\"This is a hello world example function.\"\"\"\n", |
| 863 | + " print('Hello, World!')" |
| 864 | + ], |
| 865 | + "language": "python", |
| 866 | + "metadata": {}, |
| 867 | + "outputs": [], |
| 868 | + "prompt_number": 7 |
| 869 | + }, |
| 870 | + { |
| 871 | + "cell_type": "code", |
| 872 | + "collapsed": false, |
| 873 | + "input": [ |
| 874 | + "%pdoc hello_world" |
| 875 | + ], |
| 876 | + "language": "python", |
| 877 | + "metadata": {}, |
| 878 | + "outputs": [], |
| 879 | + "prompt_number": 9 |
| 880 | + }, |
| 881 | + { |
| 882 | + "cell_type": "code", |
| 883 | + "collapsed": false, |
| 884 | + "input": [ |
| 885 | + "%pdef hello_world" |
| 886 | + ], |
| 887 | + "language": "python", |
| 888 | + "metadata": {}, |
| 889 | + "outputs": [ |
| 890 | + { |
| 891 | + "output_type": "stream", |
| 892 | + "stream": "stdout", |
| 893 | + "text": [ |
| 894 | + " \u001b[0mhello_world\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", |
| 895 | + " " |
| 896 | + ] |
| 897 | + } |
| 898 | + ], |
| 899 | + "prompt_number": 10 |
| 900 | + }, |
| 901 | + { |
| 902 | + "cell_type": "code", |
| 903 | + "collapsed": false, |
| 904 | + "input": [ |
| 905 | + "%psource math.mean()" |
| 906 | + ], |
| 907 | + "language": "python", |
| 908 | + "metadata": {}, |
| 909 | + "outputs": [ |
| 910 | + { |
| 911 | + "output_type": "stream", |
| 912 | + "stream": "stdout", |
| 913 | + "text": [ |
| 914 | + "Object `math.mean()` not found.\n" |
| 915 | + ] |
| 916 | + } |
| 917 | + ], |
| 918 | + "prompt_number": 15 |
| 919 | + }, |
| 920 | + { |
| 921 | + "cell_type": "code", |
| 922 | + "collapsed": false, |
| 923 | + "input": [ |
| 924 | + "from math import sqrt" |
| 925 | + ], |
| 926 | + "language": "python", |
| 927 | + "metadata": {}, |
| 928 | + "outputs": [ |
| 929 | + { |
| 930 | + "ename": "ImportError", |
| 931 | + "evalue": "cannot import name 'mean'", |
| 932 | + "output_type": "pyerr", |
| 933 | + "traceback": [ |
| 934 | + "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m\n\u001b[0;31mImportError\u001b[0m Traceback (most recent call last)", |
| 935 | + "\u001b[0;32m<ipython-input-16-fdd1a06c836a>\u001b[0m in \u001b[0;36m<module>\u001b[0;34m()\u001b[0m\n\u001b[0;32m----> 1\u001b[0;31m \u001b[0;32mfrom\u001b[0m \u001b[0mmath\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0mmean\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m", |
| 936 | + "\u001b[0;31mImportError\u001b[0m: cannot import name 'mean'" |
| 937 | + ] |
| 938 | + } |
| 939 | + ], |
| 940 | + "prompt_number": 16 |
| 941 | + }, |
861 | 942 | { |
862 | 943 | "cell_type": "code", |
863 | 944 | "collapsed": false, |
|
0 commit comments