summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOlly Betts <olly@survex.com>2022-03-15 11:06:20 +1300
committerOlly Betts <olly@survex.com>2022-03-15 11:06:20 +1300
commit250afd6dc3b5f3aec2b13fb97655bd4b68b28cc2 (patch)
tree096665ae3e27fd3cda6cc211685fa0a9e649c789
parentb4a92ae34f6d39825bc0eba056d6983575db4695 (diff)
downloadswig-250afd6dc3b5f3aec2b13fb97655bd4b68b28cc2.tar.gz
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.
-rw-r--r--Examples/python/variables/runme.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/Examples/python/variables/runme.py b/Examples/python/variables/runme.py
index d59e0aa3e..cf9f9f861 100644
--- a/Examples/python/variables/runme.py
+++ b/Examples/python/variables/runme.py
@@ -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)