mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-12-29 22:22:33 +01:00
20 lines
559 B
Python
Executable File
20 lines
559 B
Python
Executable File
#!/usr/bin/env python
|
|
|
|
import os, os.path
|
|
|
|
def removeFiles(_, 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'):
|
|
filename = os.path.join('logs', name)
|
|
if os.path.isfile(filename):
|
|
os.remove(filename)
|
|
os.path.walk(os.curdir, removeFiles, None)
|
|
|
|
# vim:set shiftwidth=4 tabstop=8 expandtab textwidth=78:
|