當前位置: 首頁>>代碼示例>>Python>>正文


Python GUI.get_uni方法代碼示例

本文整理匯總了Python中GUI.get_uni方法的典型用法代碼示例。如果您正苦於以下問題:Python GUI.get_uni方法的具體用法?Python GUI.get_uni怎麽用?Python GUI.get_uni使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在GUI的用法示例。


在下文中一共展示了GUI.get_uni方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: university_crime_explorer

# 需要導入模塊: import GUI [as 別名]
# 或者: from GUI import get_uni [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
開發者ID:SeanRosario,項目名稱:Campus_Crimes,代碼行數:17,代碼來源:functionalities.py

示例2: university_crime_explorer

# 需要導入模塊: import GUI [as 別名]
# 或者: from GUI import get_uni [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)	
開發者ID:thetravelingsalesman,項目名稱:Campus_Crimes,代碼行數:23,代碼來源:main.py


注:本文中的GUI.get_uni方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。