def getmoduleinfo(path):
    filename = os.path.basename(path)
    def _f(suffix, mode, mtype):
       return (-len(suffix), suffix, mode, mtype)
    suffixes = map(_f, imp.get_suffixes())
    suffixes.sort() # try longest suffixes first, in case they overlap
    for neglen, suffix, mode, mtype in suffixes:
        if filename[neglen:] == suffix:
            return filename[:neglen], suffix, mode, mtype
:arg instance: the instance someone would have to be watching in order to be notified when this event is fired
dataset/ETHPy150Open cournape/Bento/bento/compat/inspect.py/getmoduleinfo--crossover with--dataset/ETHPy150Open mozilla/django-tidings/tidings/events.py/InstanceEvent.__init__