select

topleveltools.select(expr=None)

Selects expr.

Example 1. Returns selection when expr is not none:

>>> staff = Staff("c'8 d'8 e'8 f'8")
>>> select(staff[:2])
Selection([Note("c'8"), Note("d'8")])

Example 2. Returns selector when expr is none:

>>> select()
Selector()

Returns selection.