Get named module's file location

Gnarlodious gnarlodious at gmail.com
Fri Dec 23 11:01:54 EST 2011


Given a module's name, how do I get the file path without importing it? Searched all over, can't find any such info.

Is it possible to ask if a named module exists before attempting an import?

Or are we forced to import first and catch any failure?

-- Gnarlie



More information about the Python-list mailing list