##// END OF EJS Templates
Periodic Autosave added in background thread...
Periodic Autosave added in background thread closes gh-234 Signed-off-by: MinRK <benjaminrk@gmail.com>

File last commit:

r2084:6916a3fb
r3253:8bac8cb8
Show More
task2.py
50 lines | 951 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
Brian E Granger
Fixed most of the examples. A few still don't work, but this is a start.
r1338 from IPython.kernel 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
tc = client.TaskClient()
mec = client.MultiEngineClient()
mec.execute('import time')
for i in range(24):
Brian E Granger
The refactoring of the Task system is nearly complete. Now there are...
r1395 tc.run(client.StringTask('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)
print "Queue status (vebose=False)"
print tc.queue_status()
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):
Brian E Granger
The refactoring of the Task system is nearly complete. Now there are...
r1395 tc.run(client.StringTask('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)
print "Queue status (vebose=True)"
print tc.queue_status(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):
Brian E Granger
The refactoring of the Task system is nearly complete. Now there are...
r1395 tc.run(client.StringTask('time.sleep(2)'))
Brian E Granger
Adding examples from ipython1-dev to docs/examples/kernel. These ...
r1337
print "Queue status (vebose=True)"
print tc.queue_status(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
qs = tc.queue_status(True)
sched = qs['scheduled']
for tid in sched[-4:]:
tc.abort(tid)
for i in range(6):
time.sleep(1.0)
print "Queue status (vebose=True)"
print tc.queue_status(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