added .clear to clear log

This commit is contained in:
neersighted 2012-02-29 12:00:10 -08:00
parent d8d8bf029a
commit 4e1ae63ffe
2 changed files with 24 additions and 0 deletions

13
lib/clear.py Executable file
View file

@ -0,0 +1,13 @@
#!/usr/bin/env python
# Tiny little log clearer by neersighted
import sys
import os
import subprocess
if os.path.isfile("./bot.log"):
clear = ": >./bot.log"
else:
clear = ":"
subprocess.call(clear, shell=True)
sys.exit()