def is_dotted_prefix(self, prefix, name):
        """Check whether a dotted name is a prefix of another."""
        if name == prefix:
            return True
        if name.startswith(prefix):
            if name[len(prefix)] == ".":
                return True
        return False
Check whether a dotted name is a prefix of another.
tools/module_bundler.py