April 2024 - This site, and Kamaelia are being updated. There is significant work needed, and PRs are welcome.

Cookbook Example

How can I...?

Examples 11 : Simple example showing how to use the ticker component. The ticker component was first developed for displaying subtitles. Components used: Ticker, pipeline, ReadFileAdaptor

#!/usr/bin/python

from Kamaelia.UI.Pygame.Ticker import Ticker
from Kamaelia.Util.PipelineComponent import pipeline
from Kamaelia.ReadFileAdaptor import ReadFileAdaptor

pipeline( ReadFileAdaptor("Ulysses"),
          Ticker(background_colour=(128,48,128),
                 render_left = 1,
                 render_top = 1,
                 render_right = 600,
                 render_bottom = 200,
                 position = (100, 300),
          )
).run()

Source: Examples/example11/Ticker.py