MCPcopy Create free account
hub / github.com/ActiveState/code / saveFile

Method saveFile

recipes/Python/577674_Bitmap_Maker/recipe-577674.py:552–560  ·  view source on GitHub ↗
( self, filename, compress=False )

Source from the content-addressed store, hash-verified

550 f.close()
551
552 def saveFile( self, filename, compress=False ):
553 if compress:
554 _b = self._saveBitMapWithCompression( filename )
555 else:
556 _b = self._saveBitMapNoCompression( )
557
558 f = open(filename, 'wb')
559 f.write(bytes(map(ord, _b)))
560 f.close()
561
562 def getBitmap(self, compress=False):
563 _b = ''

Callers 1

create_imageFunction · 0.95

Calls 7

bytesFunction · 0.85
mapFunction · 0.85
openFunction · 0.50
writeMethod · 0.45
closeMethod · 0.45

Tested by

no test coverage detected