16 lines
232 B
Python
16 lines
232 B
Python
# simplemod.py
|
|
|
|
x = 42 # A global variable
|
|
|
|
# A simple function
|
|
def foo():
|
|
print("x is %s" % x)
|
|
|
|
# A simple class
|
|
class Spam:
|
|
def yow(self):
|
|
print('Yow!')
|
|
|
|
# A scripting statement
|
|
print("Loaded simplemod")
|