I'm trying to modify a python library that I downloaded and am using. But the changes I'm making aren't doing anything. So I suspect that python is importing a different copy of this library from somewhere else on the filesystem. So...
When I run import foolib in python, how can I tell where on the filesystem it's getting that library from?
import foolib
print foolib.__file__
Unfortunately, this only works for some modules. E.g. it works on a module I wrote, but not on sys.