CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
pickleFileCreater.py
Go to the documentation of this file.
1 __author__="Aurelija"
2 __date__ ="$2010-07-26 12.51.12$"
3 
4 from os.path import join
5 import pickle
6 import os
7 
8 def createPickleFile(fileName, listRule, path = os.getcwd()):
9 
10  dict = {}
11 
12  try:
13  for filePath, lines in listRule:
14  dict[filePath] = lines
15  file = open(join(path, fileName), 'w')
16  pickle.dump(dict, file)
17  file.close()
18  except TypeError:
19  print 'Wrong types'
20  except IOError:
21  print 'Cannot open %s file'%fileName
static std::string join(char **cmd)
Definition: RemoteFile.cc:18