I am new to python, so this may be a stupid question.
I am working on a GUI application to configure idesk. The config file is laid out like this.
Code:
table Config
FontName: tahoma
FontSize: 8
FontColor: #ffffff
ToolTip.FontSize: 9
ToolTip.FontName: gothic
I appended each line to a list using:
Code:
for line in inFile.readlines():
if empty.match(line):
continue
else:
list.append(resub('\n','',line))
The list prints out fine, but I want to have only the characters after the colon, which are the program's values. I woul dlike to load the current values in to an input box so the user knows what they are. I tried to get it to remove the colon when I appended the items to the list, but couldn't figure out how to.
So I decided the easiest way was to parse the list and remove the characters, but I am having problems. I can remove the colon or any other character using this:
Code:
listing = [item.replace(':','') for item in list)
I tried adding an astrics before the colon, but that didn't work. any help would be appreciated.