change behaviour of instrument assignment
instrument assignment is persistent if a stream has to be unassigned from a stream, assign it to the dummy instrument '0'
This commit is contained in:
13
t.py
13
t.py
@ -17,11 +17,9 @@ crv([start], [stop], [mod.par], ['float'], [interval=...,] [add_prev=False,] [ad
|
||||
|
||||
now = int(time.time())
|
||||
result = {}
|
||||
maxcurves = 7
|
||||
maxpoints = 7
|
||||
|
||||
|
||||
def prt():
|
||||
def prt(maxpoints=7, maxcurves=7):
|
||||
for i, (key, curve) in enumerate(result.items()):
|
||||
if i > maxcurves:
|
||||
print('--- ...')
|
||||
@ -40,21 +38,20 @@ def prt():
|
||||
print(fmtime(row[0]), row[1:])
|
||||
|
||||
|
||||
def qry(*args, **kwds):
|
||||
def qry(*args, maxpoints=7, maxcurves=7, **kwds):
|
||||
result.clear()
|
||||
result.update(db.query(*args, **kwds))
|
||||
print('PRINT')
|
||||
prt()
|
||||
prt(maxpoints, maxcurves)
|
||||
|
||||
|
||||
def crv(*args, **kwds):
|
||||
def crv(*args, maxpoints=7, maxcurves=7, **kwds):
|
||||
result.clear()
|
||||
res = db.curves(*args, **kwds)
|
||||
if isinstance(res, list):
|
||||
result[()] = res
|
||||
else:
|
||||
result.update(res)
|
||||
prt()
|
||||
prt(maxpoints, maxcurves)
|
||||
|
||||
|
||||
def sry(prectime=False):
|
||||
|
Reference in New Issue
Block a user