17 lines
254 B
Python
17 lines
254 B
Python
|
# standard imports
|
||
|
import os
|
||
|
|
||
|
|
||
|
class KVWriter:
|
||
|
|
||
|
def __init__(self, path):
|
||
|
os.stat(path)
|
||
|
self.path = path
|
||
|
|
||
|
|
||
|
def write(self, k, v):
|
||
|
fp = open(self.path, str(k))
|
||
|
f = open(fp, 'w')
|
||
|
f.write(v)
|
||
|
f.close()
|