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:
parent
b4a92ae34f
commit
250afd6dc3
1 changed files with 3 additions and 1 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue