Exemplo n.º 1
0
    def get_text_input(self):
        result = self.text_input_box.get()
        result = result.rstrip()

        if len(result) > 0:
            results = result.upper()
            results = str(results)
            return results

        else:
            messagebox.showErrorMessage(self)
Exemplo n.º 2
0
 def get_text_input(self):
     result = self.text_input_box.get("1.0", "end")
     result = result.rstrip()
     if len(result) > 0:
         results = result.upper()
         results = str(results)
         return results
     else:
         self.yearly_radio_button.deselect()
         self.quarterly_radio_button.deselect()
         messagebox.showErrorMessage(self)
Exemplo n.º 3
0
    def analyze(self, event=None):
        try:
            self.get_company_name()
            self.get_company_sector()
            self.get_eps()
            self.get_pe_ratio()
            self.get_return_on_equity()
            self.current_stock_price()
            self.get_debt_to_equity_ratio()
            self.get_profit_margin()
            # self.getCompanyDetails()
            self.clear_user_input_box()

        except AttributeError as e:
            print(e)
            messagebox.showErrorMessage(self)
        except KeyError as e:
            user_input = self.get_text_input()
            print(
                f'the symbol "{user_input}" does not have {e} in the returned ticker object '
            )
            messagebox.showErrorMessage(self)