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

Method write

recipes/Python/492214_dal6py/recipe-492214.py:248–255  ·  view source on GitHub ↗
(self, string)

Source from the content-addressed store, hash-verified

246
247 # Write To File
248 def write(self, string):
249 assert type(string) is str
250 assert not self.__closed
251 assert self.__mode != self.READ
252 head = self.__stream[:self.__pointer]
253 tail = self.__stream[self.__pointer+len(string):]
254 self.__stream = head + string + tail
255 self.__pointer += len(string)
256
257 # Write All Lines
258 def writelines(self, sequence, separator=None):

Callers 6

writelinesMethod · 0.95
__menuMethod · 0.45
write_directoryMethod · 0.45
write_fileMethod · 0.45
write_blockMethod · 0.45
dumpMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected