PageRenderTime 10ms CodeModel.GetById 1ms app.highlight 4ms RepoModel.GetById 1ms app.codeStats 0ms

/trunk/Examples/python/simple/runme.py

#
Python | 30 lines | 8 code | 16 blank | 6 comment | 0 complexity | 18421f8560a150398e5ecf12602679d3 MD5 | raw file
 1# file: runme.py
 2
 3import example 
 4
 5# Call our gcd() function
 6
 7x = 42
 8y = 105
 9g = example.gcd(x,y)
10print "The gcd of %d and %d is %d" % (x,y,g)
11
12# Manipulate the Foo global variable
13
14# Output its current value
15print "Foo = ", example.cvar.Foo
16
17# Change its value
18example.cvar.Foo = 3.1415926
19
20# See if the change took effect
21print "Foo = ", example.cvar.Foo
22
23
24
25
26
27
28
29
30