Ejemplo n.º 1
0
	def all_make(self):
		excel_dir = str(self.textBrowser_excel.toPlainText())
		server_dir = str(self.textBrowser_server.toPlainText())
		client_dir = str(self.textBrowser_client.toPlainText())
		log_dir = str(self.textBrowser_log.toPlainText())
		print 'dir:', excel_dir, ';', server_dir, ';', client_dir, ';', log_dir
		error_flag = make_data.main({'isPath':1, 'file':str(excel_dir)}, server_dir, client_dir, log_dir)
		print 'error_flag:', error_flag
		#弹完成提示框
		if error_flag:
			self.msg("数据有误,请检查错误日志")
		else:
			self.msg("导出完成")
Ejemplo n.º 2
0
	def single_make(self):  
		excel_dir = str(self.textBrowser_excel.toPlainText())
		s = QFileDialog.getOpenFileName(self, _translate("Dialog", "选择需导出的文件", None), _translate("Dialog", excel_dir, None), "Excel files(*.xlsx)")
		if str(s) != '':
			server_dir = str(self.textBrowser_server.toPlainText())
			client_dir = str(self.textBrowser_client.toPlainText())
			log_dir = str(self.textBrowser_log.toPlainText())
			error_flag = make_data.main({'isPath':0, 'file':str(s)}, server_dir, client_dir, log_dir)
			print 'error_flag:', error_flag
			#弹完成提示框
			if error_flag:
				self.msg("数据有误,请检查错误日志")
			else:
				self.msg("导出完成")
Ejemplo n.º 3
0
def main():
    # Generate data using imported module
    make_data.main()

    # path = os.path.relpath('./data_generator/')
    # print('Path: ', path)
    file = '2D_dataset.csv'

    # Open data file
    try:
        data = pd.read_csv(file)

    except Exception:
        print('Cannot import file.')

    # Display imported data
    print("Data imported from file: ")
    print(data)

    # Display analysis of data -- Needs fix. data.

    # Generate plots
    data.plot(kind='scatter', x='Height', y='Weight', color='red')
    plt.show()