2016-05-01 22:48 GMT+02:00 Joseph Chrestien <[email protected]>: > Hi all, > > I know this is going to sound strange: is it possible (or even imaginable) to > run a Python code snippet from "within" Lilypond code at compile time?
Yes, see this thread in the german forum http://www.lilypondforum.de/index.php?topic=2087.0 discussed are different possibilities: (1) python from within a lilyfile.ly: Example: The file hello-world.py contains: print "Hello World!" In a .ly-file: pyMx = #(define-void-function (parser location)() (system "python hello-world.py") ;; or: ;(system* "python" "hello-world.py") ) \pyMx (2) use make (3) use abjad Example here: http://abjad.mbrsi.org/for_beginners/abjad_hello_world_in_a_file.html HTH, Harm _______________________________________________ lilypond-user mailing list [email protected] https://lists.gnu.org/mailman/listinfo/lilypond-user
