def module_to_path(mod, base=nil)
      path = mod.gsub(/\./, ::File::SEPARATOR) + '.py'
      path = ::File.join(base, path) if base
      path
    end
def module_to_path(mod, base=nil)
      path = mod.gsub(/\./, ::File::SEPARATOR) + '.py'
      path = ::File.join(base, path) if base
      path
    end
Convert a Python dotted module name to a path.

 @param mod [String] Dotted module name.
 @param base [String] Optional base path to treat the file as relative to.
 @return [String]