def callPlotFunctions(self,widget):

            Patrick.debug

            if self.dataTypesToPlot == "errors_automatically":

                    # get all files with "errors" at the beginning in the pathname folder
                    self.list_data_for_plot = []
                    self.list_data_for_plot = Patrick.getAllDatasetFileNames(pathname, "errors")
                    temp = "\\"
                    temp = Patrick.getDatasetPath(pathname) +temp

                    # add to all filenames the path
                    currentListElement = 0
                    while currentListElement < len(self.list_data_for_plot):
                            self.list_data_for_plot[currentListElement] = temp + self.list_data_for_plot[currentListElement]
                            if Patrick.debug:
                                    print "Debug MainWindow.callPlotFunctions: ", self.list_data_for_plot[currentListElement]
                            currentListElement+= 1

                    # debug output:
                    if Patrick.debug:
                            print "Debug MainWindow.callPlotFunctions: ", self.list_data_for_plot

                    #start plotting
                    Patrick.plotData(self.list_data_for_plot, self.entry_X.get_text(), self.entry_Y.get_text(), self.entry_Z.get_text(), self.entry_T.get_text(), self.plotmode, self.printInNewPlot)

            else:
                    Patrick.plotData(Patrick.datasetForPlot, self.entry_X.get_text(), self.entry_Y.get_text(), self.entry_Z.get_text(), self.entry_T.get_text(), self.plotmode, self.printInNewPlot)
def main():

    errors = 0

    #goal 1: collect and prepare the dataset to be processed
    datasetCollected = 1
    if Pedro.collectDataset() != 0:
        datasetCollected = 0
        errors += 1

    #goal 2: plot the dataset
    datasetPlotted = 1
    if Patrick.plotData(0) != 0:
        datasetPlotted = 0
        errors += 1

    datasetTought = 1
    if Pedro.teach() != 0:
        datasetTought = 0
        errors += 1

    # prints for status of goals
    if datasetCollected:
        print "\nDataset collected!"

    if not datasetCollected:
        print "\nDataset NOT collected!"

    if datasetPlotted:
        print "\nDataset plotted!"

    if not datasetPlotted:
        print "\nDataset NOT plotted!"

    if datasetTought:
        print "\nDataset Tought!"

    if not datasetTought:
        print "\nDataset NOT Tought!"

    if not errors:
        print "\nEveryting works fine!"
        return 0

    if errors:
        print "\n%d errors were found!" % errors

    return 1