f.write( obj )
def IncrRefInFile(fname):
- with open(fname,"rb") as f:
+ pass
+ """with open(fname,"rb") as f:
cntb = f.read( GetSizeOfTCnt() )
cnt = TypeCounter.from_buffer_copy( cntb ).value
with open(fname,"rb+") as f:
#import KernelServices ; KernelServices.EntryForDebuggerBreakPoint()
- f.write( bytes( TypeCounter(cnt+1) ) )
+ f.write( bytes( TypeCounter(cnt+1) ) )"""
def DecrRefInFile(fname):
- import os
+ pass
+ """import os
with open(fname,"rb") as f:
cntb = f.read( GetSizeOfTCnt() )
cnt = TypeCounter.from_buffer_copy( cntb ).value
os.unlink( fname )
else:
with open(fname,"rb+") as f:
- f.write( bytes( TypeCounter(cnt-1) ) )
+ f.write( bytes( TypeCounter(cnt-1) ) )"""
def GetBigObjectOnDiskThreshold():
import os
global orb
def LoadAndWrite(logm,tempFileName):
import SALOME_PyNode
- print( tempFileName )
logm.putStructInFileAtomic( False, tempFileName )
tempFileAuto = SALOME_PyNode.FileDeleter( tempFileName )
ret = LogManagerLoadFromFile( tempFileAuto.filename )