Thanks! That worked great. However, not its another function
inspect.getmodule that throws an error. Don't know how I can stub out
this one.
pyparsing.py", line 3284, in getTokensEndLoc
fstack = inspect.stack()
File "/base/python_dist/lib/python2.5/inspect.py", line 884, in
stack
return getouterframes(sys._getframe(1), context)
File "/base/python_dist/lib/python2.5/inspect.py", line 865, in
getouterframes
framelist.append((frame,) + getframeinfo(frame, context))
File "/base/python_dist/lib/python2.5/inspect.py", line 840, in
getframeinfo
lines, lnum = findsource(frame)
File "/base/python_dist/lib/python2.5/inspect.py", line 462, in
findsource
module = getmodule(object, file)
File "/base/python_dist/lib/python2.5/inspect.py", line 436, in
getmodule
os.path.realpath(f)] = module.__name__
File "/base/python_dist/lib/python2.5/posixpath.py", line 422, in
realpath
resolved = _resolve_link(component)
File "/base/python_dist/lib/python2.5/posixpath.py", line 445, in
_resolve_link
resolved = os.readlink(path)
AttributeError: 'module' object has no attribute 'readlink'