Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-12-01 23:40:44

0001 __author__="Aurelija"
0002 __date__ ="$2010-07-26 12.51.12$"
0003 
0004 from os.path import join
0005 import pickle
0006 import os
0007 
0008 def createPickleFile(fileName, listRule, path = os.getcwd()):
0009 
0010     dict = {}
0011     
0012     try:
0013         for filePath, lines in listRule:
0014            dict[filePath] = lines
0015         file = open(join(path, fileName), 'wb')
0016         pickle.dump(dict, file)
0017         file.close()
0018     except TypeError:
0019         print('Wrong types')
0020     except IOError:
0021         print('Cannot open %s file'%fileName)