PageSpec#

Import

from scenet import PageSpec

Defined in

scenet.ir (source)

Install

pip install scenet

Since

0.10

Stability

Public: follows semantic versioning. Below 1.0, a minor release may change it, and the CHANGELOG says how.

class scenet.ir.PageSpec[source]#

Bases: Strict

One page: tiers, top to bottom.

A page is read tier by tier, left to right within a tier – right to left, for a document whose direction is rtl – and down each column of a tier of columns, so the order panels are written in is the order they are read in. That is the page’s version of the rule a balloon obeys, and it holds by construction: columns that readers would not read down are refused by PageLayout.

Example

>>> from scenet import PageSpec, Tier
>>> page = PageSpec(tiers=[Tier(panels=[{"use": "one"}, {"use": "two"}])])
>>> [placement.use for placement in page.tiers[0].panels]
['one', 'two']

See also

Tier, one row of it.

tiers: tuple[Tier, ...]#

The page’s tiers, top to bottom.