Re: trying to write a simple python beaming snippet for Frescobaldi

2015-12-10 Thread tisimst
e to check whether the xth >> element of the string text is a space. I tried >> >> if text[x] == ' %d': >> >> and >> >> if text[x] == u"\u0020": >> >> and >> >> if text[x].isspace(): >> >> to no avail

Re: trying to write a simple python beaming snippet for Frescobaldi

2015-12-10 Thread Leszek Wroński
You're right, thanks! This showed I was actually doing the correct thing when checking whether a string element was a space. Now I see that actually Frescobaldi starts calculating the lines from the 2nd one (that is, after the line with the initial -*- expression). And so the error was when I was a

Re: trying to write a simple python beaming snippet for Frescobaldi

2015-12-10 Thread Jacques Menu
Hello Leszek, How about: >>> var = "fo a" >>> var[2] ' ' >>> var[2] == ' ' True JM > Le 10 déc. 2015 à 11:33, Leszek Wroński a écrit : > > Guys, > > Frescobaldi has the useful 'slur for the selected notes' snippet under C-(. I > want to have the same functionality for beams. That is, I wa

trying to write a simple python beaming snippet for Frescobaldi

2015-12-10 Thread Leszek Wroński
Guys, Frescobaldi has the useful 'slur for the selected notes' snippet under C-(. I want to have the same functionality for beams. That is, I want to be able to select some notes, and then via the snippet insert a '[' in the first space (that is, after the first note), and then a ']' at the end.