def load_settings(self, proj_config):
        # Substitution dictionary
        subs = {}
        subs['PAPPYDIR'] = self.pappy_dir
        subs['DATADIR'] = self.data_dir
    
        # Data file settings
        if 'data_file' in proj_config:
            self.datafile = proj_config["data_file"].format(**subs)
    
        # Debug settings
        if 'debug_dir' in proj_config:
            if proj_config['debug_dir']:
                self.debug_to_file = True
                self.debug_dir = proj_config["debug_dir"].format(**subs)
    
        # Cert directory settings
        if 'cert_dir' in proj_config:
            self.cert_dir = proj_config["cert_dir"].format(**subs)
    
        # Listener settings
        if "proxy_listeners" in proj_config:
            self.listeners = []
            for l in proj_config["proxy_listeners"]:
                if 'forward_host_ssl' in l:
                    l['forward_host_ssl'] = l['forward_host_ssl'].encode('utf-8')
                if l in 'forward_host':
                    l['forward_host'] = l['forward_host'].encode('utf-8')
                self.listeners.append(l)
    
        # SOCKS proxy settings
        self.socks_proxy = None
        if "socks_proxy" in proj_config:
            if proj_config['socks_proxy'] is not None:
                self.socks_proxy = PappyConfig._parse_proxy_login(proj_config['socks_proxy'])

        # HTTP proxy settings
        self.http_proxy = None
        if "http_proxy" in proj_config:
            if proj_config['http_proxy'] is not None:
                self.http_proxy = PappyConfig._parse_proxy_login(proj_config['http_proxy'])
    
        # History saving settings
        if "history_size" in proj_config:
            self.histsize = proj_config['history_size']
dataset/ETHPy150Open roglew/pappy-proxy/pappyproxy/config.py/PappyConfig.load_settings/swapped operands of `in`