Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(170)  |  Call(170)  |  Derive(0)  |  Import(0)

src/p/y/pymca-HEAD/PyMca5/PyMcaGui/pymca/XMCDWindow.py   pymca(Download)
            confDict.write(filename)
        except IOError:
            msg = qt.QMessageBox()
            msg.setWindowTitle('XLD/XMCD Options Error')
            msg.setText('Unable to write configuration to \'%s\''%filename)
            confDict.read(filename)
        except IOError:
            msg = qt.QMessageBox()
            msg.setTitle('XMCD Options Error')
            msg.setText('Unable to read configuration file \'%s\''%filename)
                print('Invalid value for option \'%s\'' % e)
            else:
                msg = qt.QMessageBox()
                msg.setWindowTitle('XMCD Options Error')
                msg.setText('Configuration file \'%s\' corruted' % filename)
                print('option \'%s\' not found' % e)
            else:
                msg = qt.QMessageBox()
                msg.setWindowTitle('XMCD Options Error')
                msg.setText('Configuration file \'%s\' corruted' % filename)
                seperateFile = None
        except IOError:
            msg = qt.QMessageBox(text="Unable to open '%s'"%filename)
            msg.exec_()
            return

src/p/y/pymca-HEAD/PyMca5/PyMcaGui/physics/xrf/McaCalWidget.py   pymca(Download)
            self.specfit.estimate()
        except:
            msg = qt.QMessageBox(self)
            msg.setIcon(qt.QMessageBox.Critical)
            msg.setText("Error on estimate: %s" % sys.exc_info()[1])
            self.specfit.startfit()
        except:
            msg = qt.QMessageBox(self)
            msg.setIcon(qt.QMessageBox.Critical)
            msg.setText("Error on Fit")
 
        if (npeaks < 2) or (delta==0):
            msg = qt.QMessageBox(self)
            msg.setIcon(qt.QMessageBox.Critical)
            msg.setText("Less than two peaks found")
            deltat = float(text)
        if (deltat == 0):
            msg = qt.QMessageBox(self)
            msg.setIcon(qt.QMessageBox.Critical)
            msg.setText("Invalid peak separation %g" % deltat)
                    Vret= fittedpar[2]
            except:
                msg=qt.QMessageBox(self.AText)
                msg.setWindowTitle(sys.exc_info()[0])
                msg.setIcon(qt.QMessageBox.Critical)

src/p/y/pymca-HEAD/PyMca5/PyMcaGui/physics/xrf/McaAdvancedFit.py   pymca(Download)
                npar = dialog.getParameters()
            except:
                msg = qt.QMessageBox(self)
                msg.setIcon(qt.QMessageBox.Critical)
                msg.setText("Error occured getting parameters:")
                            raise Exception(threadResult[1], threadResult[2])
            except:
                msg = qt.QMessageBox(self)
                msg.setIcon(qt.QMessageBox.Critical)
                msg.setWindowTitle("Configuration error")
                    #print "try to set"
                    self.printButton.setEnabled(False)
                    msg = qt.QMessageBox(self)
                    msg.setIcon(qt.QMessageBox.Critical)
                    msg.setText("Concentrations error: %s" % sys.exc_info()[1])
    def diagnostics(self):
        if not self.__fitdone:
            msg = qt.QMessageBox(self)
            msg.setIcon(qt.QMessageBox.Critical)
            text = "Sorry. You need to perform a fit first.\n"
        self._xrfmcMatrixSpectra = None
        if not self.__fitdone:
            msg = qt.QMessageBox(self)
            msg.setIcon(qt.QMessageBox.Critical)
            text = "Sorry, You need to perform a fit first.\n"

src/p/y/pymca-HEAD/PyMca5/PyMcaGui/pymca/QStackWidget.py   pymca(Download)
                    return fname + ".h5"
            except UnicodeEncodeError:
                msg = qt.QMessageBox(self)
                msg.setWindowTitle("Encoding error")
                msg.setIcon(qt.QMessageBox.Critical)
                    return fname + ".tif"
            except UnicodeEncodeError:
                msg = qt.QMessageBox(self)
                msg.setWindowTitle("Encoding error")
                msg.setIcon(qt.QMessageBox.Critical)
                                    compression=compression)
        except:
            msg = qt.QMessageBox(self)
            msg.setIcon(qt.QMessageBox.Critical)
            msg.setWindowTitle("Save error")
            if txt.startswith("Incomplete selection"):
                return
            msg = qt.QMessageBox(self)
            msg.setWindowTitle("Error loading slave stack")
            msg.setIcon(qt.QMessageBox.Critical)
            n = self.getPlugins()
            if n < 1:
                msg = qt.QMessageBox(self)
                msg.setIcon(qt.QMessageBox.Information)
                msg.setText("Problem loading plugins")

src/p/y/pymca-HEAD/PyMca5/PyMcaGui/physics/xrf/MaterialEditor.py   pymca(Download)
                self.graphDialog.exec_()                
        except:
            msg=qt.QMessageBox(self)
            msg.setIcon(qt.QMessageBox.Critical)
            msg.setInformativeText(str(sys.exc_info()[1]))
                self.graphDialog.exec_()
        except:
            msg=qt.QMessageBox(self)
            msg.setIcon(qt.QMessageBox.Critical)
            msg.setInformativeText(str(sys.exc_info()[1]))
            text = str(qstring)
            if text.endswith(" "):
                msg =  qt.QMessageBox(self)
                msg.setIcon(qt.QMessageBox.Critical)
                msg.setText("Invalid Material Name '%s'\n" % text + \
                    # this test is needed even if pyflakes complains
                    float(text)
                    msg =  qt.QMessageBox(self)
                    msg.setIcon(qt.QMessageBox.Critical)
                    msg.setText("Invalid Material Name %s\n" % text + \
 
        if Elements.isValidFormula(text): 
            msg =  qt.QMessageBox(self)
            msg.setIcon(qt.QMessageBox.Critical)
            msg.setText("Invalid Material Name %s\n" % text + \

src/p/y/pymca-HEAD/PyMca5/PyMcaGui/pymca/RGBCorrelatorWidget.py   pymca(Download)
                    self.setImageShape(shape)
            except:
                msg = qt.QMessageBox(self)
                msg.setIcon(qt.QMessageBox.Critical)
                msg.setText("Error reshaping: %s" % sys.exc_info()[1])
                    qimage = qt.QImage(fname)
                    if qimage.isNull():
                        msg = qt.QMessageBox(self)
                        msg.setIcon(qt.QMessageBox.Critical)
                        msg.setText("Cannot read file %s as an image" % fname)
                        self.addBatchDatFile(fname, csv=False)            
        except:
            msg = qt.QMessageBox(self)
            msg.setIcon(qt.QMessageBox.Critical)
            msg.setText("Error adding file: %s" % sys.exc_info()[1])
                self.rows.setText("%g" % self._shape[0])
                self.columns.setText("%g" % self._shape[1])
                msg = qt.QMessageBox(self)
                msg.setIcon(qt.QMessageBox.Critical)
                msg.setText("Invalid shape %d x %d" % (nrows, ncolumns))
                msg.exec_()
        except:
            self.rows.setText("%g" % self._shape[0])
            self.columns.setText("%g" % self._shape[1])
            msg = qt.QMessageBox(self)

src/p/y/pymca-HEAD/PyMca5/PyMcaGui/pymca/QPyMcaMatplotlibSave.py   pymca(Download)
            self.imageWidget.setParameters(ddict)
        except:
            msg = qt.QMessageBox(self)
            msg.setIcon(qt.QMessageBox.Critical)
            msg.setText("Error updating image:")
            self.printPreview.raise_()
        except:
            msg = qt.QMessageBox(self)
            msg.setIcon(qt.QMessageBox.Critical)
            msg.setText("Error printing image: %s" % sys.exc_info()[1])
                outstr = qt.safe_str(outfile.selectedFiles()[0])
            except:
                msg = qt.QMessageBox(self)
                msg.setIcon(qt.QMessageBox.Critical)
                msg.setText("Error saving image: %s" % sys.exc_info()[1])
                os.remove(finalFile)
            except:
                msg = qt.QMessageBox(self)
                msg.setIcon(qt.QMessageBox.Critical)
                msg.setText("Cannot overwrite file: %s" % sys.exc_info()[1])
                s.saveImage(finalFile)
            except:
                msg = qt.QMessageBox(self)
                msg.setIcon(qt.QMessageBox.Critical)
                msg.setText("Error saving file: %s" % sys.exc_info()[1])

src/p/y/pymca-HEAD/PyMca5/PyMcaGui/physics/xrf/ConcentrationsWidget.py   pymca(Download)
            self.__lastKw = None
            self.concentrationsTable.setRowCount(0)
            msg = qt.QMessageBox(self)
            msg.setIcon(qt.QMessageBox.Critical)
            msg.setText("%s" % sys.exc_info()[1])
            else:
                self.referenceLine.setText('Auto')
                msg = qt.QMessageBox(self.referenceLine)
                msg.setIcon(qt.QMessageBox.Critical)
                msg.setText("Invalid Element %s" % current)
            elif not Elements.isValidFormula(current):
                self.referenceLine.setText('Auto')
                msg = qt.QMessageBox(self.referenceLine)
                msg.setIcon(qt.QMessageBox.Critical)
                msg.setText("Invalid Element %s" % current)
                current = current.upper()[0]
            else:
                msg = qt.QMessageBox(self._lineEdit)
                msg.setIcon(qt.QMessageBox.Critical)
                msg.setText("Invalid Element %s" % current)
                msg.exec_()
                self._lineEdit.setFocus()
            if not Elements.isValidFormula(current):
                msg = qt.QMessageBox(self._lineEdit)

src/p/y/pymca-HEAD/PyMca5/PyMcaGui/pymca/PyMcaMain.py   pymca(Download)
            self._dispatcherAddSelectionSlot(ddict)
        except:
            msg = qt.QMessageBox(self)
            msg.setIcon(qt.QMessageBox.Critical)
            msg.setText("Error: %s" % sys.exc_info()[1])
    def dispatcherRemoveSelectionSlot(self, ddict):
        try:
            return self._dispatcherRemoveSelectionSlot(ddict)
        except:
            msg = qt.QMessageBox(self)
    def dispatcherReplaceSelectionSlot(self, ddict):
        try:
            return self._dispatcherReplaceSelectionSlot(ddict)
        except:
            msg = qt.QMessageBox(self)
                                    self.sourceWidget.selectorWidget[source].openFile(SourceName)
                            except:
                                msg = qt.QMessageBox(self)
                                msg.setIcon(qt.QMessageBox.Critical)
                                txt = "Error: %s\n opening file %s" % (sys.exc_info()[1],SourceName )
                            selectorWidget.setWidgetConfiguration(ddict[source]['WidgetConfiguration'])
                        except:
                            msg = qt.QMessageBox(self)
                            msg.setIcon(qt.QMessageBox.Critical)
                            txt = "Error: %s\n configuring %s widget" % (sys.exc_info()[1], source )

src/p/y/pymca-HEAD/PyMca5/PyMcaGui/physics/xrf/XRFMCPyMca.py   pymca(Download)
    def _closeDialog(self):
        if self.logWidget is None:
            close = True
        elif self.logWidget.isSubprocessRunning():
            msg = qt.QMessageBox(self)
    def errorMessage(self, text, title=None):
        msg = qt.QMessageBox(self)
        if title is not None:
            msg.setWindowTitle(title)
        msg.setIcon(qt.QMessageBox.Critical)
    def start(self):
        try:
            self._start()
        except:
            msg = qt.QMessageBox(self)
        if ddict['event'] == "ProcessFinished":
            returnCode = ddict['code']
            msg = qt.QMessageBox(self)
            msg.setWindowTitle("Simulation finished")
            if returnCode == 0:
                msg.setIcon(qt.QMessageBox.Information)
                text = "Simulation finished, output written to the directory:\n"
                text += "%s" % self.__outputDir
            else:
                msg = qt.QMessageBox(self)

  1 | 2 | 3 | 4  Next