In particular, lilypond-book is just a python script. On windows,
we need to call the python interpreter, using the full path to
the script while being wary of spaces in the path.
extlist = ['']
if "PATHEXT" in os.environ:
extlist += os.environ["PATHEXT"].split(os.pathsep)
extlist = ['']
if "PATHEXT" in os.environ:
extlist += os.environ["PATHEXT"].split(os.pathsep)
use_win32_modules = 0
if os.name == "nt":
use_win32_modules = 0
if os.name == "nt":
# have found it). Return just the basename to avoid
# problems when the path to the executable contains
# spaces.
# have found it). Return just the basename to avoid
# problems when the path to the executable contains
# spaces.
+ if full_path.lower().endswith('.py'):
+ return command.replace(prog, '"%s" "%s"'
+ % (sys.executable, full_path))
return command
return None
return command
return None