本文整理匯總了Python中GUI.start_user_interface方法的典型用法代碼示例。如果您正苦於以下問題:Python GUI.start_user_interface方法的具體用法?Python GUI.start_user_interface怎麽用?Python GUI.start_user_interface使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類GUI
的用法示例。
在下文中一共展示了GUI.start_user_interface方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: university_crime_explorer
# 需要導入模塊: import GUI [as 別名]
# 或者: from GUI import start_user_interface [as 別名]
def university_crime_explorer(dataframe, crimes_obj, university_name, branch_name, GUI_Required):
'''Gives out the crime details related to a university + branch'''
if GUI_Required:
GUI.start_user_interface(dataframe)
university_name = GUI.get_uni()
branch_name = GUI.get_branch()
print "Details about %s (%s) is being generated. Please wait..." % (university_name, branch_name)
college_instance = handlers.college_details(dataframe, university_name, branch_name)
college_obj = coll.College(college_instance, crimes_obj)
multibar_plot, pie_chart = get_university_crime_details_and_plot(dataframe, college_obj, crimes_obj)
return university_name, branch_name, multibar_plot, pie_chart
示例2: university_crime_explorer
# 需要導入模塊: import GUI [as 別名]
# 或者: from GUI import start_user_interface [as 別名]
def university_crime_explorer(dataframe):
'''Handles the features of first GUI'''
GUI.start_user_interface(dataframe)
university_name = GUI.get_uni()
branch_name = GUI.get_branch()
print "Details about %s (%s) is being generated. Please wait..." % (university_name, branch_name)
college_instance = handlers.college_details(dataframe, university_name, branch_name)
college_obj = coll.College(college_instance, crimes_obj)
crime_per_student_without_average = handlers.all_crimes_per_student_over_years(college_obj, crimes_obj) # Question 1
crime_per_student_with_average = handlers.all_crimes_per_student_over_years(college_obj, crimes_obj, average=True) # Question 2
crimes_per_student_by_category = handlers.average_crimes_per_student_by_category(dataframe, 'State', crimes_obj) # Question 3
pltparam = plotting.pltParam()
answers_obj = plots.Answers(crimes_obj, college_obj, pltparam, crime_per_student_without_average, crime_per_student_with_average, crimes_per_student_by_category)
answers_obj.visualize_answer1()
answers_obj.pieChart(crime_per_student_with_average)