def _split_varpath(cont, path):
    """Return a tuple of compname,component,varname given a path
    name of the form 'compname.varname'. If the name is of the form
    'varname', then compname will be None and comp is cont.
    """
    try:
        compname, varname = path.split('.', 1)
    except ValueError:
        return (None, cont, path)

    t = cont.get_trait(compname)
    if t and t.iotype:
        return (None, cont, path)
    return (compname, getattr(cont, compname), varname)