print "Testing exception wrapping" try: testdll.throws() except RuntimeError, e: print "Success: Exception caught!" print e print S = testdll.S s = S() print "s.s = 'hello'" s.s = 'hello' print "s.s" print s.s print "s.write_s()" s.write_s() print print "Testing custom conversion function" print testdll.conv1() testdll.conv2(20) print print '--------' print 'SUCCESS' print '--------'
exec(""" try: testdll.throws() except RuntimeError as e: print ("Success: Exception caught!") print (e) """) print ("") S = testdll.S s = S() print ("s.s = 'hello'") s.s = ('hello') print ("s.s") print (s.s) print ("s.write_s()") s.write_s() print ("") print ("Testing custom conversion function") print (testdll.conv1()) testdll.conv2(20) print ("") print ('--------') print ('SUCCESS') print ('--------')