module object not callable

Soldato
Joined
30 Nov 2005
Posts
13,915
getting this error from a python module

Code:
Traceback (most recent call last):
  File "/home/jay/Python scripts/precon2010.py", line 27, in <module>
    res = calc(amt,total)
TypeError: 'module' object is not callable



Code:
from __future__ import division

def calc(amt,total):

    s=[]
    for i in range(len(amt)):
        s.append((amt[i]/sum(amt))*total)

    return s

it was working yesterday but I don't know what I have changed to break it.
 
Back
Top Bottom