Show More
@@ -36,7 +36,8 b'' | |||||
36 | ], |
|
36 | ], | |
37 | "language": "python", |
|
37 | "language": "python", | |
38 | "metadata": {}, |
|
38 | "metadata": {}, | |
39 | "outputs": [] |
|
39 | "outputs": [], | |
|
40 | "prompt_number": 2 | |||
40 | }, |
|
41 | }, | |
41 | { |
|
42 | { | |
42 | "cell_type": "markdown", |
|
43 | "cell_type": "markdown", | |
@@ -438,12 +439,35 b'' | |||||
438 | "outputs": [] |
|
439 | "outputs": [] | |
439 | }, |
|
440 | }, | |
440 | { |
|
441 | { | |
|
442 | "cell_type": "heading", | |||
|
443 | "level": 2, | |||
|
444 | "metadata": {}, | |||
|
445 | "source": [ | |||
|
446 | "Local Execution" | |||
|
447 | ] | |||
|
448 | }, | |||
|
449 | { | |||
|
450 | "cell_type": "markdown", | |||
|
451 | "metadata": {}, | |||
|
452 | "source": [ | |||
|
453 | "As of IPython 0.14, you can instruct `%%px` to also execute the cell locally.\n", | |||
|
454 | "This is useful for interactive definitions,\n", | |||
|
455 | "or if you want to load a data source everywhere,\n", | |||
|
456 | "not just on the engines." | |||
|
457 | ] | |||
|
458 | }, | |||
|
459 | { | |||
441 | "cell_type": "code", |
|
460 | "cell_type": "code", | |
442 | "collapsed": false, |
|
461 | "collapsed": false, | |
443 |
"input": [ |
|
462 | "input": [ | |
|
463 | "%%px --local\n", | |||
|
464 | "thispid = os.getpid()\n", | |||
|
465 | "print thispid" | |||
|
466 | ], | |||
444 | "language": "python", |
|
467 | "language": "python", | |
445 | "metadata": {}, |
|
468 | "metadata": {}, | |
446 | "outputs": [] |
|
469 | "outputs": [], | |
|
470 | "prompt_number": 5 | |||
447 | } |
|
471 | } | |
448 | ], |
|
472 | ], | |
449 | "metadata": {} |
|
473 | "metadata": {} |
General Comments 0
You need to be logged in to leave comments.
Login now