clearConfigurations.py
Go to the documentation of this file.
1 import glob,os,shutil
2 
3 
4 #configs = glob.glob("../../macros/Optimizations/CP_test/*");
5 
6 #for config in configs:
7 # config_number = config.split("/")[-1].split("_")[2].split(".")[0]
8 # if(float(config_number)>100):
9 # print "Removing",config
10 # os.remove(config)
11 
12 for i in range(4400, 4501):
13 
14  files = "/lbne/data/users/ljf26/fluxfiles/g4lbne/v3r3p5/QGSP_BERT/Optimizations-ME_run1-"+str(i)
15 
16  print files
17 
18  if os.path.exists(files):
19  shutil.rmtree(files)
20 
21 # files = "/lbne/data2/users/ljf26/fluxfiles/g4lbne/v3r3p5/QGSP_BERT/Optimizations-CPNuMI_run5-"+str(i)
22 
23 # if os.path.exists(files):
24 # shutil.rmtree(files)
25 
26  files2 = "/lbne/app/users/ljf26/fluxfiles/g4lbne/v3r3p5/QGSP_BERT/Optimizations-ME_run1-"+str(i)
27  print files2
28  if os.path.exists(files2):
29  shutil.rmtree(files2)
30  """
31  macro = "../../macros/Optimizations/CP_run5/CP_run5_"+str(i)+".mac"
32  if os.path.exists(macro):
33  os.remove(macro)
34  """
35 
36 # macro = "../../macros/Optimizations/CP_run4RHC/CP_run4RHC_"+str(i)+".mac"
37 # if os.path.exists(macro):
38 # os.remove(macro)
static QCString str