def saveProject(self):
        if hasattr(self,'project'):
            if self.project.filename is not None:
                self.project.saveToDisk()
            else:
                fileName = QtGui.QFileDialog.getSaveFileName(self, "Save Project", ilastik.gui.LAST_DIRECTORY, "Project Files (*.ilp)")
                fn = str(fileName)
                if len(fn) > 4:
                    if fn[-4:] != '.ilp':
                        fn = fn + '.ilp'
                    if self.project.saveToDisk(fn):
                        QtGui.QMessageBox.information(self, 'Success', "The project has been saved successfully to:\n %s" % str(fileName), QtGui.QMessageBox.Ok)
                        
                ilastik.gui.LAST_DIRECTORY = QtCore.QFileInfo(fn).path()
            print "saved Project to ", self.project.filename
dataset/ETHPy150Open ilastik/ilastik-0.5/ilastik/ilastikMain.py/MainWindow.saveProject/original