ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/ns_dev/Python/NinoCode/RandomCodeRequests/davita_code.txt
Revision: 8
Committed: Sat May 5 04:21:19 2012 UTC (13 years, 10 months ago) by ninoborges
Content type: text/plain
File size: 1487 byte(s)
Log Message:
Initial Import

File Contents

# Content
1 """Making an XFS file for davita ga, with their bates that does not enumerate well with the current methods,
2 so that I can then load it in as a lfp overwriting the annotations. However, this just makes the xfs, so you
3 can use it for lots of stuff. I also used this xsf to make a targeted production where BegNo = prodBegNo. so
4 you can make a prod that skips around.
5
6
7 >>> outputFile = open(r"\\lisdisdss01\dis20\C_D\39323292\Prod\20100622_Re_Prod.xfs",'w')
8 >>> for line in contents:
9 ... line = line.replace("\n","")
10 ... begprod, endprod, begNo, endNo = line.split(",")
11 ... prodList = FixBatesRange_func.EnumerateBates(begprod, endprod)
12 ... if len(endNo) < 17:
13 ... begNoAlpha = ""
14 ... begNoList = FixBatesRange_func.EnumerateBates(begNo,endNo)
15 ... elif len(endNo) == 20:
16 ... begNoAlpha = begNo
17 ... begNo = begNo + "_0001"
18 ... tempList = FixBatesRange_func.EnumerateBates(begNo.split('_')[1],endNo.split('_')[1])
19 ... begNoList = []
20 ... for i in tempList:
21 ... begNoList.append(begNoAlpha + "_" + i)
22 ... elif len(endNo) == 21:
23 ... begNoAlpha = begNo
24 ... begNo = begNo + "_00001"
25 ... tempList = FixBatesRange_func.EnumerateBates(begNo.split('_')[1],endNo.split('_')[1])
26 ... begNoList = []
27 ... for i in tempList:
28 ... begNoList.append(begNoAlpha + "_" + i)
29 ... else:
30 ... print "ERROR!!!"
31 ... masterlist = zip(begNoList,prodList)
32 ... for x in masterlist:
33 ... outputFile.write("%s|%s\n"% x)
34 ...
35 >>> outputFile.close()