Skip to content

Commit 3516adf

Browse files
authored
Merge pull request #1773 from cuthbertLab/improve-lily-open-windows
Improve Lilypond opening in Windows
2 parents 0ea1e00 + 1f9cccc commit 3516adf

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

music21/lily/translate.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,8 +201,11 @@ def findLilyExec(self):
201201
def setupTools(self):
202202
LILYEXEC = self.findLilyExec()
203203
command = [LILYEXEC, '--version']
204+
platform = common.getPlatform()
205+
creation_flags = subprocess.CREATE_NO_WINDOW if platform == 'win' else 0
204206
try:
205-
with subprocess.Popen(command, stdout=subprocess.PIPE) as proc:
207+
with subprocess.Popen(command, stdout=subprocess.PIPE,
208+
creationflags=creation_flags) as proc:
206209
stdout, unused = proc.communicate()
207210
stdout = stdout.decode(encoding='utf-8')
208211
versionString = stdout.split()[2]

music21/musicxml/m21ToXml.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5885,10 +5885,12 @@ def romanNumeralToXml(self, rn: roman.RomanNumeral) -> Element|list[Element]:
58855885
self.xmlRoot.append(mxHarmony)
58865886
return mxHarmony
58875887

5888-
def chordSymbolToXml(self,
5889-
cs: harmony.ChordSymbol,
5890-
*,
5891-
append: bool = True) -> Element|list[Element]:
5888+
def chordSymbolToXml(
5889+
self,
5890+
cs: harmony.ChordSymbol,
5891+
*,
5892+
append: bool = True
5893+
) -> Element|list[Element]:
58925894
# noinspection PyShadowingNames
58935895
'''
58945896
Convert a ChordSymbol object to either a chord (if .writeAsChord is True)
@@ -5921,7 +5923,6 @@ def chordSymbolToXml(self,
59215923
</bass>
59225924
</harmony>
59235925
5924-
59255926
Now give function:
59265927
59275928
>>> cs.romanNumeral = 'I64'

0 commit comments

Comments
 (0)