How can I find out which module a name is imported from?

Viewed 2803

In a Python program, if a name exists in the namespace of the program, is it possible to find out if the name is imported from some module, and if yes, which module it is imported from?

5 Answers
Related