add read and write methods to db.DuckDB
This commit is contained in:
parent
7a8f286e78
commit
6389478750
10
db.py
10
db.py
|
@ -16,6 +16,16 @@ class DuckDB:
|
||||||
for i in self.db:
|
for i in self.db:
|
||||||
fd.write(i.stringify() + "\n")
|
fd.write(i.stringify() + "\n")
|
||||||
|
|
||||||
|
def read(self, location):
|
||||||
|
fd = open(location, "r")
|
||||||
|
self.parse(fd)
|
||||||
|
fd.close()
|
||||||
|
|
||||||
|
def write(self, location):
|
||||||
|
fd = open(location, "w")
|
||||||
|
self.output(fd)
|
||||||
|
fd.close
|
||||||
|
|
||||||
class DuckEvent:
|
class DuckEvent:
|
||||||
def __init__(self, line=None):
|
def __init__(self, line=None):
|
||||||
self.status = ""
|
self.status = ""
|
||||||
|
|
Loading…
Reference in New Issue