Advertisement
Guest User

worker

a guest
Aug 8th, 2014
242
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.35 KB | None | 0 0
  1. import time
  2. import sys
  3.  
  4. group = sys.argv[1]
  5. offset = sys.argv[2]
  6.  
  7. fo = open('bigfile')
  8. count = 0
  9. for line in fo:
  10.     if count%int(group) == int(offset):
  11.         # supuesto proceso que tarda mucho.
  12.         time.sleep(1)
  13.         # proceso para ver que el archivo resultante fue modificado
  14.         sys.stdout.write(line.replace('*','='))
  15.     count+=1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement