Skip to content

Instantly share code, notes, and snippets.

@maximveksler
Created November 16, 2011 12:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save maximveksler/1369936 to your computer and use it in GitHub Desktop.
Save maximveksler/1369936 to your computer and use it in GitHub Desktop.
#!/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