Mine
public text v1 · immutableclass ListEntry (LabelEntry):
"""A widget for entering a space-separated list of text items"""
def __init__(self, master=None, label="List", default=''):
LabelEntry.__init__(self, master, label, default)
def get(self):
"""Split text into a list at space boundaries."""
# text = LabelEntry.get(self)
text = shlex.split(LabelEntry.get(self))
return text
def set(self, listvalue):
"""Set a value to a list, joined with spaces."""
text = ' '.join(listvalue)
LabelEntry.set(self, text)