I'm having some problems with reading data from file. I want to get properties from .ini data file to be red by the function, but configparser doesn't read it properly. I would be very grateful if someone could explain that is wrong. Thank you in advance!
Function snippet
config = configparser.ConfigParser()
config.read('config.ini')
def browseFiles():
filename = filedialog.askopenfilename(initialdir = config['select']['dir'],
title = config['select']['ttl'],
filetypes = config['select']['ft'])
# Change label contents
label_file_explorer.configure(text="File Opened: "+filename)
my .ini file data
[select]
#directory
dir = "home/"
#title
ttl = "Select a File"
#filetype
ft = (("Text files","*.txt*"),("all files","*.*"))