def to_zb(num, base, sgn='-', sep='.'):
    """
    converts an integer from base ten to base (integer and abs(base) > 1)
    returns a list
    """
    if not num:
        return [0]
    E = ValueError('invalid base')
    if abs(base) < 2:
        raise E
    num, lst, base = int(num), [], int(base)
    if num < 0 and base > 0:
        num *= -1
        lst = [sgn]
    while num:
        num, d = divmod(num, base)
        if d < 0:
            num += 1
            d -= base
        lst.append(d)
    lst.reverse()
    return lst
