Re: [Tutor] error message

2009-07-08 Thread Steven Buck
_file.rea d(self._col_size(i))), range(self._header['nvar'])) C:\Python26\lib\site-packages\StataTools.py in (i) 168 else: 169 data[i] = self._unpack(typlist[i], self._file.read(s elf._col_size(i))) 170 return data 171

[Tutor] error message

2009-07-08 Thread Steven Buck
I'm running a for loop which returns an error message after the third iteration (see out[4] at the bottom as evidence). I don't understand the error message. Although I'll continue to do my own digging to debug, I thought I'd give you all a shot. Thanks, -steve Python 2.6.2 (r262:71605, Apr 14

Re: [Tutor] append question

2009-07-06 Thread Steven Buck
ch I call 'age'? Thanks for your patience with this newbie. Steve On Sun, Jul 5, 2009 at 5:19 PM, Rich Lovely wrote: > 2009/7/5 Steven Buck : > >>>> for i in len(test): > testvar2.append(test[i][2]) > > > > I want testvar2 = [2,5,8] b

[Tutor] append question

2009-07-05 Thread Steven Buck
;>> for i in len(test): testvar2.append(test[i][2]) I want testvar2 = [2,5,8] but instead I get the following error message: Traceback (most recent call last): File "", line 1, in for i in len(test): TypeError: 'int' object is not iterable Any insight would be ap

[Tutor] reading variables in a data set?

2009-07-04 Thread Steven Buck
r, so let me know if I've used it appropriately or if I should change/narrow the structure of my question. Thanks Steve -- Steven Buck Ph.D. Student Department of Agricultural and Resource Economics University of California, Berkeley ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor