From 792e5d4d2fac1cb5cbcb72fad6c0aa0df1b3f5fa Mon Sep 17 00:00:00 2001 From: Charles Merriam Date: Fri, 30 Jan 2015 09:45:57 -0800 Subject: [PATCH] Add documentation to examples/camera/main.py --- examples/camera/main.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/examples/camera/main.py b/examples/camera/main.py index 5d87f04b1..fb4596431 100644 --- a/examples/camera/main.py +++ b/examples/camera/main.py @@ -1,6 +1,19 @@ +''' +Camera Example +============== + +This example demonstrates a simple use of the camera. It shows a window with +a buttoned labelled 'play' to turn the camera on and off. Note that +not finding a camera, perhaps because gstreamer is not installed, will +throw an exception during the kv language processing. + +''' + +# Uncomment these lines to see all the messages #from kivy.logger import Logger #import logging #Logger.setLevel(logging.TRACE) + from kivy.app import App from kivy.lang import Builder @@ -18,6 +31,7 @@ BoxLayout: height: '48dp' ''' + class TestCamera(App): def build(self): return Builder.load_string(kv)