--- a/install.py Tue Jul 19 18:51:15 2016 +0200 +++ b/install.py Sun Jul 24 15:57:47 2016 +0200 @@ -469,10 +469,11 @@ if os.path.exists(os.path.join(dirName, sourceName + "c")): os.remove(os.path.join(dirName, sourceName + "c")) - # step 2: delete the __pycache__ directory and all *.pyc files + # step 2: delete the __pycache__ directory and all remaining *.pyc files if os.path.exists(os.path.join(dirName, "__pycache__")): shutil.rmtree(os.path.join(dirName, "__pycache__")) - for name in [f for f in dirListing if fnmatch.fnmatch(f, "*.pyc")]: + for name in [f for f in os.listdir(dirName) + if fnmatch.fnmatch(f, "*.pyc")]: os.remove(os.path.join(dirName, name)) # step 3: descent into subdirectories and delete them if empty