This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import logging | |
| from logging.handlers import * | |
| import sys | |
| class errorLogFilter(logging.Filter): | |
| def filter(self,record): | |
| if record.msg.startswith('error'): | |
| return True | |
| return False |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| pbpaster | cut -d: -f 1 | awk '{printf "\"%s\",\n",$1}' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def readfilerev(fd): | |
| buff = 256 | |
| fd.seek(0,2) | |
| size = fd.tell() | |
| rem = size % buff | |
| #pos = max(0, (size / buff -1) * buff) | |
| line = '' | |
| pos = -1 | |
| while fd.tell() > 0: | |
| fd.seek(pos, 1) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def readfilerev(fd): | |
| buff = 256 | |
| fd.seek(0,2) | |
| size = fd.tell() | |
| rem = size % buff | |
| #pos = max(0, (size / buff -1) * buff) | |
| line = '' | |
| pos = -1 | |
| while fd.tell() > 0: | |
| fd.seek(pos, 1) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import re | |
| import sys | |
| import os | |
| def filerev(somefile, buffer=256): | |
| somefile.seek(0, os.SEEK_END) | |
| size = somefile.tell() | |
| lines = [''] | |
| rem = size % buffer | |
| pos = max(0, (size // buffer - 1) * buffer) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import sys | |
| def readfilerev(fd): | |
| buff = 256 | |
| fd.seek(0,2) | |
| size = fd.tell() | |
| rem = size % buff | |
| pos = max(0, size - (buff + rem)) | |
| line = '' | |
| while pos >= 0 : | |
| fd.seek(pos, 0) |