Created
November 16, 2011 12:09
-
-
Save maximveksler/1369936 to your computer and use it in GitHub Desktop.
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
#!/usr/bin/python | |
import sys | |
import mmap | |
import os | |
if (len(sys.argv) > 1): | |
STAT_FILE=sys.argv[1] | |
print STAT_FILE | |
else: | |
print "Need to know <statistics file name path>" | |
sys.exit(1) | |
with open(STAT_FILE, "r") as f: | |
map = mmap.mmap(f.fileno(), 0, prot=mmap.PROT_READ) | |
while((line = map.readline()) != None): | |
print line |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment