You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

37 lines
867 B

  1. #!/usr/bin/env python
  2. from __future__ import print_function
  3. import sys
  4. sys.path.append('.')
  5. from example import Example1
  6. instance1 = Example1()
  7. instance2 = Example1(32)
  8. instance1.add1(instance2)
  9. instance1.add2(instance2)
  10. instance1.add3(instance2)
  11. instance1.add4(instance2)
  12. instance1.add5(instance2)
  13. instance1.add6(32)
  14. instance1.add7(32)
  15. instance1.add8(32)
  16. instance1.add9(32)
  17. instance1.add10(32)
  18. print("Instance 1: " + str(instance1))
  19. print("Instance 2: " + str(instance2))
  20. print(instance1.self1())
  21. print(instance1.self2())
  22. print(instance1.self3())
  23. print(instance1.self4())
  24. print(instance1.self5())
  25. print(instance1.internal1())
  26. print(instance1.internal2())
  27. print(instance1.internal3())
  28. print(instance1.internal4())
  29. print(instance1.internal5())
  30. print("Instance 1, direct access = %i" % instance1.value)
  31. instance1.value = 100
  32. print("Instance 1: " + str(instance1))