List variables in variables example

Seems useful in itself, but also serves to check if
https://sourceforge.net/p/swig/bugs/976/ is still reproducible.
This commit is contained in:
Olly Betts 2022-03-15 11:06:20 +13:00
commit 250afd6dc3

View file

@ -2,6 +2,8 @@
import example
print("Variables =", example.cvar)
# Try to set the values of some global variables
example.cvar.ivar = 42
@ -22,7 +24,7 @@ example.cvar.name = "Bill"
# Now print out the values of the variables
print("Variables (values printed from Python)")
print("\nVariables (values printed from Python)")
print("ivar = %s" % example.cvar.ivar)
print("svar = %s" % example.cvar.svar)