make db.DuckDB().__init__(self, ...) use db.DuckDB().read(self, location) for reading file data
This commit is contained in:
parent
6389478750
commit
6bf490ead4
5
db.py
5
db.py
|
@ -2,10 +2,7 @@ class DuckDB:
|
||||||
def __init__(self, location=None):
|
def __init__(self, location=None):
|
||||||
self.location = location
|
self.location = location
|
||||||
self.db = []
|
self.db = []
|
||||||
if location != None:
|
if location != None: read(location)
|
||||||
fd = open(location, "r")
|
|
||||||
self.parse(fd)
|
|
||||||
fd.close()
|
|
||||||
|
|
||||||
def parse(self, fd):
|
def parse(self, fd):
|
||||||
lines = [i.rstrip() for i in fd.readlines()]
|
lines = [i.rstrip() for i in fd.readlines()]
|
||||||
|
|
Loading…
Reference in New Issue