def newdir(dirs):
    dirs = set(dirs)
    newdirs = set([i for i in os.listdir(dname) if not
                   os.path.isfile(os.path.join(dname, i))])
    newdir = newdirs.difference(dirs)
    if len(newdir) != 1:
        msg = ("There was more than one directory created. Don't know what "
               "to delete.")
        raise Exception(msg)
    newdir = newdir.pop()
    return newdir
Returns difference in directories between dirs and current directories
dataset/ETHPy150Open statsmodels/statsmodels/tools/update_web.py/newdir