io.write_ly — Abjad v1.1.1 documentation

### Navigation

- index
- modules |
- next |
- previous |
- Project Abjad »
- Abjad v1.1.1 documentation »
- Abjad API »

# io.write_ly

`abjad.tools.io.` `write_ly`(expr, name, template=None, title=None, footer=None, lilytime=None)

  Format expr as LilyPond input and write to output file name.

  - expr : Abjad `_Component` to be written to disk.
  - name : `str`. The full path name (relative or absolute) of the LilyPond file. If only the file name is given, the file is written to the current directory.
  - template : `string`, `None`. The name of the template to use to format the LilyPond file. If `None`, no template is used.
  - title : `str`, `None`. The title of the file.

  Write `t` to `foo.ly` in the current directory.

      abjad> t = Note(0, (1, 4))
      abjad> write_ly(t, 'foo.ly')

  Write `t` to `foo.ly` in the `/home/user` directory. Include the `paris.ly` template in `foo.ly`.

      abjad> t = Note(0, (1, 4))
      abjad> write_ly(t, '/home/user/foo.ly', 'paris')

  New in version 1.1.1: Optional footer keyword.

### Navigation

- index
- modules |
- next |
- previous |
- Project Abjad »
- Abjad v1.1.1 documentation »
- Abjad API »