Alexnb a écrit :
I am not sure what is going on here. Here is the code that is being run:
def getWords(self):
self.n=0
for entry in self.listBuffer:
self.wordList[self.n] = entry.get()
self.n=self.n+1
print self.wordList
def get_words(self):
Alexnb wrote:
> well okay, so what can I do?
>
>
>
Firstly, stop top posting. Replies to a thread "flow" better if bottom
posted.
Secondly, it sounds like you want to build a list of the results from
your entry.get() calls.
Try this:
self.wordList = []
def getWords(self):
for entry in se
Alexnb wrote:
>
> I am not sure what is going on here. Here is the code that is being run:
>
> def getWords(self):
> self.n=0
The value of self.n only makes sense within the method, so you better use
the local variable n instead of the instance attribute self.n
> for entry in s
Actually I tried that and had no sucsess, but I just figured it out. I set
every value in wordList to 'None' and so even if all the entry fields aren't
taken up, they go to '', so I can tell what is and what isn't taken up, and
get the string of the ones that are taken up.
Terry Reedy wrote:
>
Alexnb wrote:
I am not sure what is going on here. Here is the code that is being run:
def getWords(self):
self.n=0
for entry in self.listBuffer:
self.wordList[self.n] = entry.get()
And what does self.wordList begin as? If {}, then the assignemt is
invalid. Per
well okay, so what can I do?
A.T.Hofkamp-3 wrote:
>
> On 2008-07-02, Alexnb <[EMAIL PROTECTED]> wrote:
>> I have no idea what "list assignment index out of range means?!?!
>
> You are assigning a value to a non-existing list element, as in
>
x = [1]
x[2] = 4
> Traceback (most recen
On 2008-07-02, Alexnb <[EMAIL PROTECTED]> wrote:
> I have no idea what "list assignment index out of range means?!?!
You are assigning a value to a non-existing list element, as in
>>> x = [1]
>>> x[2] = 4
Traceback (most recent call last):
File "", line 1, in ?
IndexError: list assignment in