swig/Examples/test-suite/python/director_property_runme.py
2014-10-01 11:07:02 +02:00

18 lines
314 B
Python

import director_property
class PyFoo(director_property.Foo):
a = property(director_property.Foo.getA, director_property.Foo.setA)
def ping(self):
return "PyFoo::ping()"
foo = PyFoo()
foo.setA("BLABLA")
if foo.getA() != "BLABLA":
raise RuntimeError
foo.a = "BIBI"
if foo.a != "BIBI":
raise RuntimeError