Files
dev/script/test/bug.py
2018-04-17 12:05:48 +02:00

77 lines
1.4 KiB
Python
Executable File

task = None
running = False
for i in range (2):
for j in range (2):
task = None
running = False
print '.',
running = False
print "Next"
print '.',
print '.',
print '.',
print '.',
print "Next"
import ch.psi.utils.swing.SwingUtils as SwingUtils
print SwingUtils.getString(None, "Select:" , ["a","b","c"],'a');
def _startPlot(type):
global running
print "Starting plot: type " + str(type)
running = True
p = plot(None,name="")[0]
s= p.getSeries(0)
from random import randint
while running:
try:
s.appendData(time.time(),randint(0,9))
time.sleep(0.1)
except:
pass
print "Done Plotting"
def startPlot(type = 1):
global task
task = fork((_startPlot,(type,)),)
def stopPlot():
global task, running
running = False
ret = join(task)
for i in range (5):
startPlot()
try:
time.sleep(1.0)
finally:
stopPlot()
"""
from startup import *
def test():
lscan(inp, (sin,out,arr), 0, 40, 20, 0.1)
"""
"""
for i in range(1000):
#caget("13SIM1:image1:ArrayData","[b")
caget("TESTIOC:TESTWF2:MyWF","[b")
#caget("TESTIOC:TESTSINUS:SinCalc",'d')
print "->",
#det.data.read()
#sin.read()
arr.read()
print i
"""