def __init__(self, settings=False, verbose=False):
        """
        Create an AutoInvestor instance
         - settings should be a Settings object that will manage getting
           and saving all user and investment settings.
         - Set verbose to True if you want to see debugging logs
        """
        self.verbose = verbose
        self.logger = util.create_logger(verbose)
        self.app_dir = util.get_app_directory()

        # Create settings object
        if settings is False:
            self.settings = Settings(settings_dir=self.app_dir, logger=self.logger, verbose=self.verbose)
        else:
            self.settings = settings
        self.settings.investor = self  # create a link back to this instance
    def __init__(self, settings_dir=None, logger=False, verbose=False):
        """
        settings_dir is the directory that will be used to
        save the user and investment settings files
        """
        self.settings_dir = settings_dir

        # Create logger if none was passed in
        if not logger:
            self.logger = util.create_logger(verbose)
        else:
            self.logger = logger

        # Create the settings directory, if it doesn't exist
        if self.settings_dir and not os.path.exists(self.settings_dir):
            os.mkdir(self.settings_dir)

        self.get_user_settings()
        self.load_investment_settings_file()
    def __init__(self, settings=False, verbose=False):
        """
        Create an AutoInvestor instance
         - settings should be a Settings object that will manage getting
           and saving all user and investment settings.
         - Set verbose to True if you want to see debugging logs
        """
        self.verbose = verbose
        self.logger = util.create_logger(verbose)

        # Setup user directory
        if os.path.exists(self.app_dir) and not os.path.isdir(self.app_dir):
            raise AutoInvestorError('The path \'{0}\' is not a directory.'.format(self.app_dir))
        elif not os.path.exists(self.app_dir):
            os.mkdir(self.app_dir)

        # Create settings object
        if settings is False:
            self.settings = Settings(self.app_dir, self.logger)
        else:
            self.settings = settings
        self.settings.investor = self  # create a link back to this instance