def saveData(self): try: filePathDir = QFileDialog.getSaveFileName(self, "Save Input Data",QCoreApplication.applicationDirPath (),"Xml Files(*.xml)") if filePathDir == "": return DataHelper.saveInputParameters(filePathDir, self) return filePathDir except UserWarning as e: QMessageBox.warning(self, "Error", e.message)
def saveData(self): try: filePathDir = QFileDialog.getSaveFileName(self, "Save Input Data",QCoreApplication.applicationDirPath (),"Xml Files(*.xml)") if filePathDir == "": return DataHelper.saveInputParameters(filePathDir, self) # contents = None # with open(filePathDir, 'rb', 0) as tempFile: # contents = tempFile.read() # tempFile.flush() # tempFile.close() # bytes = FasDataBlockFile.CRC_Calculation(contents) # string_0 = QString(filePathDir) # path = string_0.left(string_0.length() - 3) + "crc" # fileStream = open(path, 'wb') # fileStream.write(bytes) # fileStream.close() return filePathDir except UserWarning as e: QMessageBox.warning(self, "Error", e.message)