MCPcopy Index your code
hub / github.com/rocky/python-uncompyle6 / write

Method write

test/ok_lib2.7/bsddb/dbrecio.py:126–135  ·  view source on GitHub ↗
(self, s)

Source from the content-addressed store, hash-verified

124 self.db.put(self.key, "", txn=self.txn, dlen=self.len-size, doff=size)
125
126 def write(self, s):
127 if self.closed:
128 raise ValueError, "I/O operation on closed file"
129 if not s: return
130 if self.pos > self.len:
131 self.buflist.append('\0'*(self.pos - self.len))
132 self.len = self.pos
133 newpos = self.pos + len(s)
134 self.db.put(self.key, s, txn=self.txn, dlen=len(s), doff=self.pos)
135 self.pos = newpos
136
137 def writelines(self, list):
138 self.write(string.joinfields(list, ''))

Callers 5

writelinesMethod · 0.95
DeadlockWrapFunction · 0.45
_get_default_tempdirFunction · 0.45
print_diffFunction · 0.45
test_funcoutputFunction · 0.45

Calls 2

appendMethod · 0.45
putMethod · 0.45

Tested by 1

test_funcoutputFunction · 0.36