/home/bes3soft/bes3soft/Boss/7.0.2/dist/7.0.2/Mdc/DedxCalibAlg/DedxCalibAlg-00-01-15/share/shell/genDaylist.py

Go to the documentation of this file.
00001 #!/usr/bin/env python
00002 
00003 import os
00004 import sys
00005 import re
00006 
00007 if(len(sys.argv)<2):
00008     print("are you sure you want to get the mother path from bringrun_forraw.py?")
00009     pyfile = open("bringrun_forraw.py", "r")
00010     for line in pyfile:
00011         if(line.find("sourcedir=")>-1):
00012             pathname = line.split('"')[1]
00013             print "the path is: ", pathname
00014             break
00015 else:
00016     pathname = sys.argv[1]
00017     print(pathname)
00018 dirList=os.listdir(pathname)
00019 dayfilename = "daylist.txt"
00020 dayfile = open(dayfilename,"w")
00021 
00022 for fname in dirList:
00023     if((fname.find("tmp") == -1) & (fname.find("rec") == -1)):
00024         dayfile.write(fname)
00025         dayfile.write('\n')
00026 dayfile.close()

Generated on Tue Nov 29 23:12:45 2016 for BOSS_7.0.2 by  doxygen 1.4.7