##// END OF EJS Templates
Merging -r 1177 from lp:ipython with fixes and resolutions....
Merging -r 1177 from lp:ipython with fixes and resolutions. The main conflicts I had to fix were in ultratb. I have removed the ultraTB.py in IPython/kernel/core. Now IPython/core/ultratb.py is being used everywhere. Also I have protected the calls to ipapi.get to see if None is returned. This happens when trial IPython.kernel is run.

File last commit:

r2084:6916a3fb
r2124:4a54d9d3 merge
Show More
task2.py
50 lines | 951 B | text/x-python | PythonLexer
#!/usr/bin/env python
# encoding: utf-8
from IPython.kernel import client
import time
import sys
flush = sys.stdout.flush
tc = client.TaskClient()
mec = client.MultiEngineClient()
mec.execute('import time')
for i in range(24):
tc.run(client.StringTask('time.sleep(1)'))
for i in range(6):
time.sleep(1.0)
print "Queue status (vebose=False)"
print tc.queue_status()
flush()
for i in range(24):
tc.run(client.StringTask('time.sleep(1)'))
for i in range(6):
time.sleep(1.0)
print "Queue status (vebose=True)"
print tc.queue_status(True)
flush()
for i in range(12):
tc.run(client.StringTask('time.sleep(2)'))
print "Queue status (vebose=True)"
print tc.queue_status(True)
flush()
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)
flush()