Staging
v0.5.1
https://github.com/python/cpython
Revision 31d6de5aba009914efa8f0f3c3d7da35217578eb authored by Chris Withers on 13 January 2020, 19:11:34 UTC, committed by GitHub on 13 January 2020, 19:11:34 UTC
This isn't included in `__all__` and could be a source of confusion.
1 parent 2b1df45
Raw File
Tip revision: 31d6de5aba009914efa8f0f3c3d7da35217578eb authored by Chris Withers on 13 January 2020, 19:11:34 UTC
remove unused __version__ from mock.py (#17977)
Tip revision: 31d6de5
rmpyc.py
# Remove all the .pyc files under ../Lib.


def deltree(root):
    import os
    from os.path import join

    npyc = 0
    for root, dirs, files in os.walk(root):
        for name in files:
            # to be thorough
            if name.endswith(('.pyc', '.pyo')):
                npyc += 1
                os.remove(join(root, name))

    return npyc

npyc = deltree("../Lib")
print(npyc, ".pyc deleted")
back to top