This is only possible if you've defined a package named glob
in the module search path, so instead of loading the built-in module glob
python is importing that package.
Something like this in the module search path
glob
├── glob.py
├── glob.pyc
├── __init__.py
└── __init__.pyc
will produce the same error:
>>> import glob
>>> glob.__file__
'/home/monty/py/glob/__init__.pyc'
>>> glob.glob()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: 'module' object is not callable
You need to change the name of this package to something else because it seems to be present on the module search path used by eclipse.