/usr/share/doc/python-soya-doc/examples/pudding-svgelements-1.py is in python-soya-doc 0.14-2.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# -*- indent-tabs-mode: t -*-
import os, sys
import soya.pudding as pudding
import soya.pudding.ext.svgelements as svgelements
import soya
soya.init()
soya.path.append(os.path.join(os.path.dirname(sys.argv[0]), "data"))
e_man = svgelements.ElementManager('test.png', 'test.svg')
e_man.find_elements()
print e_man.elements
scene = soya.World()
camera = soya.Camera(scene)
soya.set_root_widget(pudding.core.RootWidget())
soya.root_widget.add_child(camera)
elimg = svgelements.ElementImage(soya.root_widget,
left=0, top=0, width=0, height=0,
manager=e_man, image='console')
elimg.on_resize()
svgelements.ElementImage(soya.root_widget,
left=0, top=elimg.height, width=0, height=0,
manager=e_man, image='info')
pudding.main_loop.MainLoop(scene).main_loop()
|