I have a small application that takes in a string of numbers, runs them through a function, and spits out the output. For the list entry I have the following set up:
def create_widgets(self):
self.entryLabel = Label(self, text="Please enter a list of numbers:")
self.entryLabel.grid(row=0, column=0, columnspan=2)
self.listEntry = Entry(self)
self.listEntry.grid(row=0, column=2, sticky=E)
However, this only allows me to input strings (e.g. 123451011) while I would like it to be able to recognize individual numbers (e.g. 1,2,3,4,5,10,11). I suppose essentially what I'm asking is to be able to use a list instead of a string. Is there a way to change self.listEntry to handle this? Is there something I can add into my function instead (which currently inputs valueList = list(self.listEntry.get()))? Thanks!
EDIT:
I defined a function as follows:
def Function(self):
valueList = list([int(x) for x in self.listEntry.get().split(",")])
x = map(int, valueList)
Which then continues to outline how to run the numbers and tells the program to give the output.