Abjad “hello, world!” (in a file)¶
Writing the file¶
Open the terminal and change to whatever directory you’d like.
Use your text editor to create a new file called
If you have
hello_world.py left over from earlier you should delete it
and create a new file.
Type the following lines of code into
from abjad import * note = Note("c'4") show(note)
hello_world.py and quit your text editor.
Interpreting the file¶
Call Python on
$ python hello_world.py
hello_world.py and shows the score you’ve created.
Repeating the process¶
Working with files in Abjad means that you do these things:
- edit a file
- interpret the file
These steps make up a type of edit-interpret loop.
This way of working with Abjad remains the same no matter how complex the scores you build become.