PageRenderTime 7ms CodeModel.GetById 1ms app.highlight 4ms RepoModel.GetById 1ms app.codeStats 0ms

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

#
Python | 29 lines | 18 code | 11 blank | 0 comment | 2 complexity | e31236b09c5d5bbf2f3538edc0415f66 MD5 | raw file
 1from director_string import *
 2
 3class B(A):
 4  def __init__(self,string):
 5    A.__init__(self,string)
 6
 7  def get_first(self):
 8    return A.get_first(self) + " world!"
 9
10  def process_text(self, string):
11    A.process_text(self, string)
12    self.smem = "hello"
13    
14
15
16b = B("hello")
17
18b.get(0)
19if b.get_first() != "hello world!":
20  print b.get_first() 
21  raise RuntimeError
22
23
24b.call_process_func()
25
26if b.smem != "hello":
27  print smem
28  raise RuntimeError
29