Limnoria/scripts/clean.py
James Vega c803e5e9d8 Added vim:set ... : strings to source in order to keep file formatting
consistent between developers. Jeremy should be adding the equivalent
settings for emacs soon.
2003-03-24 08:41:19 +00:00

19 lines
586 B
Python
Executable File

#!/usr/bin/env python
import os, sys, os.path, shutil
def removeFiles(arg, dirname, names):
for name in names:
if name[-4:] in ('.pyc', 'pyo'):
os.remove(os.path.join(dirname, name))
elif name[-1] == '~':
os.remove(os.path.join(dirname, name))
if __name__ == '__main__':
for name in os.listdir('logs'):
os.remove(os.path.join('logs', name))
for name in os.listdir('conf'):
os.remove(os.path.join('conf', name))
os.path.walk(os.curdir, removeFiles, None)
# vim:set shiftwidth=4 tabstop=8 expandtab textwidth=78: