rawsource="/Users/user/project/CODE_BASE" for root, dirs, files in os.walk(rawsource): print(root)
This is printing like 4-5 levels