3 import pickle, os.path, sys, os
6 return os.path.isfile(fp)
16 SCTCalibConfigFile=myPickle[
'SCTCalibConfig']
17 fileName=
'SCTCalibConfig.py'
18 dissectedPath=thisPath.split(
'/')
19 dissectedPath[-1]=
'share'
20 sharePath=
'/'.
join(dissectedPath)
21 newFileName=sharePath+
'/'+fileName
22 myPickle[
'SCTcalibConfig']=newFileName
25 pickleFile=
open(newPickleName,
'w')
26 pickle.dump(data, pickleFile)
29 os.remove(originalFile)
30 os.rename(newFile,originalFile)
35 existingPickleFilename=
'./newargdict.gpickle'
36 newPickleFileName=
'mynewpickle.gpickle'
40 swapFiles(existingPickleFilename,newPickleFileName)
43 if __name__==
"__main__":