PageRenderTime 25ms CodeModel.GetById 0ms RepoModel.GetById 0ms app.codeStats 0ms

/trunk/Examples/test-suite/python/director_stl_runme.py

#
Python | 39 lines | 27 code | 12 blank | 0 comment | 0 complexity | a888ec8fc67ad4602f918a109853026f MD5 | raw file
Possible License(s): LGPL-2.1, Cube, GPL-3.0, 0BSD, GPL-2.0
  1. import director_stl
  2. class MyFoo(director_stl.Foo):
  3. def ping(self, s):
  4. return "MyFoo::ping():" + s
  5. def pident(self, arg):
  6. return arg
  7. def vident(self,v):
  8. return v
  9. def vidents(self,v):
  10. return v
  11. def vsecond(self,v1,v2):
  12. return v2
  13. a = MyFoo()
  14. a.tping("hello")
  15. a.tpong("hello")
  16. p = (1,2)
  17. a.pident(p)
  18. v = (3,4)
  19. a.vident(v)
  20. a.tpident(p)
  21. a.tvident(v)
  22. v1 = (3,4)
  23. v2 = (5,6)
  24. a.tvsecond(v1,v2)
  25. vs=("hi", "hello")
  26. vs
  27. a.tvidents(vs)