Exemplo n.º 1
0
    def __report(self, file_name="", verb=False):

        # DO the calcs
        self.calc_mass()
        self.calc_fos()

        if file_name is "":
            f = ""
        else:
            f = open(file_name, 'w')

        # Print date and time
        report.pw(f, time.strftime('%X %x %Z'), v=verb)

        # Indicate whether the results can be trusted
        if self.result_suspect:
            report.pw(f,
                      "The condition number is " + str(self.condition) +
                      ". Results may be inaccurate.",
                      v=verb)

        report.pw(f, os.getcwd(), v=verb)

        report.print_summary(f, self, verb=verb)

        report.print_instantiation_information(f, self, verb=verb)

        report.print_stress_analysis(f, self, verb=verb)

        if self.THERE_ARE_GOALS:
            report.print_recommendations(f, self, verb=verb)

        # Try to close, and except if
        if file_name is not "":
            f.close()
Exemplo n.º 2
0
    def __report(self, file_name="", verb=False):

        # DO the calcs
        self.calc_mass()
        self.calc_fos()

        if file_name is "":
            f = ""
        else:
            f = open(file_name, 'w')

        # Print date and time
        report.pw(f, time.strftime('%X %x %Z'), v=verb)

        # Indicate whether the results can be trusted
        if self.result_suspect:
            report.pw(f, "The condition number is " + str(self.condition)
                          + ". Results may be inaccurate.", v=verb)

        report.pw(f, os.getcwd(), v=verb)

        report.print_summary(f, self, verb=verb)

        report.print_instantiation_information(f, self, verb=verb)

        report.print_stress_analysis(f, self, verb=verb)

        if self.THERE_ARE_GOALS:
            report.print_recommendations(f, self, verb=verb)

        # Try to close, and except if
        if file_name is not "":
            f.close()
Exemplo n.º 3
0
    def __report(self, file_name="", verb=False):

        # DO the calcs
        self.calc_mass()
        self.calc_fos()

        if file_name == "":
            f = ""
        else:
            f = open(file_name, 'w')

        # Print date and time
        global timestamp_pr
        timestamp_pr = '{:%Y-%m-%d %H:%M:%S}'.format(datetime.datetime.now())
        report.pw(f, timestamp_pr, v=verb)
        report.pw(f, os.getcwd(), v=verb)

        report.print_summary(f, self, verb=verb)

        report.print_instantiation_information(f, self, verb=verb)

        report.print_stress_analysis(f, self, verb=verb)

        if self.THERE_ARE_GOALS:
            report.print_recommendations(f, self, verb=verb)

        # Try to close, and except if
        if file_name != "":
            f.close()
Exemplo n.º 4
0
    def __report(self, file_name="", verb=False):

        # DO the calcs
        self.calc_mass()
        self.calc_fos()

        if file_name is "":
            f = ""
        else:
            f = open(file_name, 'w')

        # Print date and time
        report.pw(f, time.strftime('%X %x %Z'), v=verb)
        report.pw(f, os.getcwd(), v=verb)

        report.print_summary(f, self, verb=verb)

        report.print_instantiation_information(f, self, verb=verb)

        report.print_stress_analysis(f, self, verb=verb)

        if self.THERE_ARE_GOALS:
            report.print_recommendations(f, self, verb=verb)

        # Try to close, and except if
        if file_name is not "":
            f.close()