Thanks G-Do! I think you gave me a good hint where i went wrong. Here is my error prone code:

# a dictionary of functions by bumsfeld
# get errors = TypeError: 'int' object is not callable
def add(a, b):
return a + b
def sub(a, b):
return a - b
def mul(a, b):
return a * b
def div(a, b):
return a / b
a = b = 1
mathD = {
'+' : add(a, b),
'-' : sub(a, b),
'*' : mul(a, b),
'/' : div(a, b)
}
f = mathD['+']
print f(99, 13)

G-Do did give you the hint, don't call the functions from the dictionary, just reference them. I took the liberty to play with your code a little ...

def add(a, b):
return a + b
def subtract(a, b):
return a - b
def multiply(a, b):
return a * b
def divide(a, b):
if b == 0:
print "divide by zero error"
else:
return a / b
# use the function reference, not the actual call
mathD = {
'+' : add,
'-' : subtract,
'*' : multiply,
'/' : divide
}
f = mathD['+']
print f(99, 13)
# or simpler ...
print mathD['+'](99, 13)
# maybe less cryptic ...
def calc(math_op, a, b):
return mathD[math_op](a, b)
# now you can use ...
print calc('/', 355, 113.0)

That is not necessarily the OP's actual question,
(does not even have a dictionary of functions)
but I was facing the problem that I needed something like the calc function
that vegaseat suggested and this is what I came up with:

Good day community,
I have completed vb.net program (a school timetabling program) and I am in the process to create a website. At the moment word -press on wamp server ...

I am looking for log archival utility or approach which should be able to help me in based on below policy.
(1) whenever log file (system.log) size >30859 or file ...