import os from configobj import ConfigObj from headphones import config_file config = ConfigObj(config_file) General = config['General'] http_host = General['http_host'] http_port = General['http_port'] http_username = General['http_username'] http_password = General['http_password'] launch_browser = General['launch_browser'] usenet_retention = General['usenet_retention'] include_lossless = General['include_lossless'] flac_to_mp3 = General['flac_to_mp3'] move_to_itunes = General['move_to_itunes'] path_to_itunes = General['path_to_itunes'] rename_mp3s = General['rename_mp3s'] cleanup = General['cleanup'] add_album_art = General['add_album_art'] music_download_dir = General['music_download_dir'] NZBMatrix = config['NZBMatrix'] nzbmatrix = NZBMatrix['nzbmatrix'] nzbmatrix_username = NZBMatrix['nzbmatrix_username'] nzbmatrix_apikey = NZBMatrix['nzbmatrix_apikey'] Newznab = config['Newznab'] newznab = Newznab['newznab'] newznab_host = Newznab['newznab_host'] newznab_apikey = Newznab['newznab_apikey'] NZBsorg = config['NZBsorg'] nzbsorg = NZBsorg['nzbsorg'] nzbsorg_uid = NZBsorg['nzbsorg_uid'] nzbsorg_hash = NZBsorg['nzbsorg_hash'] SABnzbd = config['SABnzbd'] sab_username = SABnzbd['sab_username'] sab_password = SABnzbd['sab_password'] sab_apikey = SABnzbd['sab_apikey'] sab_category = SABnzbd['sab_category'] sab_host = SABnzbd['sab_host'] def var_to_chk(variable): if variable == '1': return 'Checked' else: return '' form = '''