def graphFromDB(c, g):
for row in c.execute ("SELECT * FROM node"):
print (row[1])
g.add_node(row)
'Constructs a graph from DB data.'
'Initialize Graph.'
'Retrieve Nodes.'
'For each node, insert it in graph.'
'Possibly edges should be inserted in the same loop.'
#c.close()
#GUI
#Main loop.
评论列表
文章目录