Debian Codegraph @

src/Scripts/Editor/add_chn_k.py

raw symbols SCIP
1 text = q.getOrc()
2 lines = text.splitlines()
3 chngets = [ x for x in lines if x.find("chnget") > 0]
4 channels = [ ch[ch.index('"') + 1:ch.rindex('"')] for ch in chngets]
5
6 newlines = [ 'chn_k "%s", 1'%s for s in channels]
7
8 newtext = '\n'.join(newlines)
9 q.insertText(newtext)
10
11 print("%i lines inserted"%len(newlines))
12
13 #for (i, chn) in enumerate(channels):
14 #q.createNewSlider(i*30, 40, chn)