##// END OF EJS Templates
Merge pull request #2179 from dopplershift/pylab-switch...
Merge pull request #2179 from dopplershift/pylab-switch Enable switching %pylab mode between inline and a single gui mode in a single notebook. With this merge, `%pylab` can be called interactively to toggle inline/GUI (matplotlib floating windows) mode. After initializing `%pylab inline`, now one can call `%pylab` without arguments to activate the default GUI or ask for a specific one as usual. IPython will detect if a different GUI is requested if one was already activated and will refuse to do so (to prevent multiple event loops from running concurrently, which often leads to problems).

File last commit:

r6455:15863dc1
r8027:6dac6929 merge
Show More
task2.py
50 lines | 924 B | text/x-python | PythonLexer
Brian E Granger
Adding examples from ipython1-dev to docs/examples/kernel. These ...
r1337 #!/usr/bin/env python
# encoding: utf-8
MinRK
translate last remaining old parallel examples
r3690 from IPython.parallel import Client
Brian E Granger
Adding examples from ipython1-dev to docs/examples/kernel. These ...
r1337 import time
Fernando Perez
Add stdout flushing statements to example....
r2084 import sys
flush = sys.stdout.flush
Brian E Granger
Adding examples from ipython1-dev to docs/examples/kernel. These ...
r1337
MinRK
translate last remaining old parallel examples
r3690 rc = Client()
v = rc.load_balanced_view()
mux = rc[:]
Brian E Granger
Adding examples from ipython1-dev to docs/examples/kernel. These ...
r1337
for i in range(24):
MinRK
translate last remaining old parallel examples
r3690 v.apply(time.sleep, 1)
Brian E Granger
Adding examples from ipython1-dev to docs/examples/kernel. These ...
r1337
for i in range(6):
time.sleep(1.0)
Thomas Kluyver
Update print syntax in parallel examples.
r6455 print("Queue status (vebose=False)")
print(v.queue_status(verbose=False))
Fernando Perez
Add stdout flushing statements to example....
r2084 flush()
Brian E Granger
Adding examples from ipython1-dev to docs/examples/kernel. These ...
r1337
for i in range(24):
MinRK
translate last remaining old parallel examples
r3690 v.apply(time.sleep, 1)
Brian E Granger
Adding examples from ipython1-dev to docs/examples/kernel. These ...
r1337
for i in range(6):
time.sleep(1.0)
Thomas Kluyver
Update print syntax in parallel examples.
r6455 print("Queue status (vebose=True)")
print(v.queue_status(verbose=True))
Fernando Perez
Add stdout flushing statements to example....
r2084 flush()
Brian E Granger
Adding examples from ipython1-dev to docs/examples/kernel. These ...
r1337
for i in range(12):
MinRK
translate last remaining old parallel examples
r3690 v.apply(time.sleep, 2)
Brian E Granger
Adding examples from ipython1-dev to docs/examples/kernel. These ...
r1337
Thomas Kluyver
Update print syntax in parallel examples.
r6455 print("Queue status (vebose=True)")
print(v.queue_status(verbose=True))
Fernando Perez
Add stdout flushing statements to example....
r2084 flush()
Brian E Granger
Adding examples from ipython1-dev to docs/examples/kernel. These ...
r1337
MinRK
translate last remaining old parallel examples
r3690 # qs = v.queue_status(verbose=True)
# queued = qs['scheduled']
Brian E Granger
Adding examples from ipython1-dev to docs/examples/kernel. These ...
r1337
MinRK
translate last remaining old parallel examples
r3690 for msg_id in v.history[-4:]:
v.abort(msg_id)
Brian E Granger
Adding examples from ipython1-dev to docs/examples/kernel. These ...
r1337
for i in range(6):
time.sleep(1.0)
Thomas Kluyver
Update print syntax in parallel examples.
r6455 print("Queue status (vebose=True)")
print(v.queue_status(verbose=True))
Fernando Perez
Add stdout flushing statements to example....
r2084 flush()
Brian E Granger
Adding examples from ipython1-dev to docs/examples/kernel. These ...
r1337