import source from 1.3.40
[external/swig.git] / Examples / python / simple / runme.py
1 # file: runme.py
2
3 import example 
4
5 # Call our gcd() function
6
7 x = 42
8 y = 105
9 g = example.gcd(x,y)
10 print "The gcd of %d and %d is %d" % (x,y,g)
11
12 # Manipulate the Foo global variable
13
14 # Output its current value
15 print "Foo = ", example.cvar.Foo
16
17 # Change its value
18 example.cvar.Foo = 3.1415926
19
20 # See if the change took effect
21 print "Foo = ", example.cvar.Foo
22
23
24
25
26
27
28
29
30