本文整理汇总了Python中Analysis.makingBalanceLifeGraph方法的典型用法代码示例。如果您正苦于以下问题:Python Analysis.makingBalanceLifeGraph方法的具体用法?Python Analysis.makingBalanceLifeGraph怎么用?Python Analysis.makingBalanceLifeGraph使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Analysis
的用法示例。
在下文中一共展示了Analysis.makingBalanceLifeGraph方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: OnPressEnter2
# 需要导入模块: import Analysis [as 别名]
# 或者: from Analysis import makingBalanceLifeGraph [as 别名]
def OnPressEnter2(self,event):
solution = self.entryVariable2.get()
part = solution.split("-")
rw_csv.deleteOldGoal(part[1])
item = part[1].split(" ")
score = item[len(item)-1]
rw_csv.writeScore({part[0]:int(score)})
for i in self.tree.get_children():
self.tree.delete(i)
result = rw_csv.readScore()
self.tree.insert("" , 0, text="Score", values=(result["Family"],result["Travel"],result["Studying"],result["Friend"],result["Volunteer"]))
goal = rw_csv.readGoal()
id2 = self.tree.insert("", 1, "Task", text="Task")
family_text = ""
for x in goal["Family"]:
family_text = family_text + x+ "\n"
travel_text = ""
for x in goal["Travel"]:
travel_text = travel_text + x+ "\n"
studying_text = ""
for x in goal["Studying"]:
studying_text = studying_text + x+"\n"
friend_text = ""
for x in goal["Friend"]:
friend_text = friend_text + x+"\n"
volunteer_text = ""
for x in goal["Volunteer"]:
volunteer_text = volunteer_text + x+"\n"
self.tree.insert(id2, "end", text="", values=(family_text,travel_text,studying_text,friend_text,volunteer_text))
Analysis.makingBalanceLifeGraph(result["Family"],result["Travel"],result["Studying"],result["Friend"],result["Volunteer"])
img = self.img = ImageTk.PhotoImage(Image.open('BalanceLifeGraph.png'))
self.panel = Tkinter.Label(self,image=img)
self.panel.pack(side = "left")