<commit_before>import ConfigParser
from gi.repository import Gtk
from pref_mapping import *
from var import *

def read_config_if_exists(filename):
	if os.path.isfile(filename):
		# Init config parser and read config
		Config = ConfigParser.SafeConfigParser()
		Config.read(filename)
		section = "TorGTKprefs"

		# Loop through options
		options = Config.options(section)
		for option in options:
			value = Config.get(section, option)
			print objs[pref_mappings[option]]
			objs[pref_mappings[option]].set_value(int(value))

def write_config(filename):
	# Open file
	config_fd = open(filename, "w")

	Config = ConfigParser.ConfigParser()
	Config.add_section("TorGTKprefs")
	# Write sections to file and close it
	for key in pref_mappings:
		Config.set("TorGTKprefs", key, objs[pref_mappings[key]].get_text())
	Config.write(config_fd)
	config_fd.close()<commit_msg>Remove line for debugging which lists object type from elements of listbox<commit_after>import ConfigParser
from gi.repository import Gtk
from pref_mapping import *
from var import *

def read_config_if_exists(filename):
	if os.path.isfile(filename):
		# Init config parser and read config
		Config = ConfigParser.SafeConfigParser()
		Config.read(filename)
		section = "TorGTKprefs"

		# Loop through options
		options = Config.options(section)
		for option in options:
			value = Config.get(section, option)
			objs[pref_mappings[option]].set_value(int(value))

def write_config(filename):
	# Open file
	config_fd = open(filename, "w")

	Config = ConfigParser.ConfigParser()
	Config.add_section("TorGTKprefs")
	# Write sections to file and close it
	for key in pref_mappings:
		Config.set("TorGTKprefs", key, objs[pref_mappings[key]].get_text())
	Config.write(config_fd)
	config_fd.close()
{'fraction_non_alphanumeric': 0.10022779043280182, 'fraction_numerical': 0.0, 'mean_word_length': 5.5315985130111525, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3909047', 'n_tokens_mistral': 597, 'n_tokens_neox': 567, 'n_words': 144}