Attachment 'test.py'

Download

   1 scale=0.2
   2 filein=open("dh6180.csv","r")
   3 fileout=open("out.csv","w")
   4 while (1):
   5     a=filein.readline()
   6     if len(a)==0 : break
   7     b=[int(i) for i in a.split()]
   8     b[0]-=int(b[2]*scale/2)
   9     b[1]-=int(b[3]*scale/2)
  10     b[2]=int(b[2]*(1+scale))
  11     b[3]=int(b[3]*(1+scale))
  12     fileout.write("%d\t%d\t%d\t%d\t%d\n"%(b[0],b[1],b[2],b[3],b[4]))
  13 filein.close()
  14 fileout.close()

Attached Files

To refer to attachments on a page, use attachment:filename, as shown below in the list of files. Do NOT use the URL of the [get] link, since this is subject to change and can break easily.

You are not allowed to attach a file to this page.