Re: [Tutor] list question

2009-08-11 Thread Dave Angel
Wayne wrote: On Tue, Aug 11, 2009 at 7:17 AM, wrote: hi i am currently doing the 'livewires' python tutorial lesson 5. i am making a little game that makes a few squares chase a circle around a little grid. i can get the 1 square acting on 1 variable to come up, but the tutorial now wants

Re: [Tutor] list question

2009-08-11 Thread Ataulla S H
if u want to add new attributes into ur list u need to import list object in ur class class customlist(list): x = 'your val' c = customlist() >>> dir(c) ['__add__', '__class__', '__contains__', '__delattr__', '__delitem__', '__delslice__', '__dict__', '__doc__', '__eq__', '__ge__', '__getattr

Re: [Tutor] list question

2009-08-11 Thread Wayne
On Tue, Aug 11, 2009 at 7:17 AM, wrote: > hi i am currently doing the 'livewires' python tutorial lesson 5. i am > making a little game that makes a few squares chase a circle around a little > grid. i can get the 1 square acting on 1 variable to come up, but the > tutorial now wants me to creat

Re: [Tutor] list question

2009-08-11 Thread Ataulla S H
On Tue, Aug 11, 2009 at 5:47 PM, wrote: > hi i am currently doing the 'livewires' python tutorial lesson 5. i am > making a little game that makes a few squares chase a circle around a little > grid. i can get the 1 square acting on 1 variable to come up, but the > tutorial now wants me to creat

[Tutor] list question

2009-08-11 Thread proportional
hi i am currently doing the 'livewires' python tutorial lesson 5. i am making a little game that makes a few squares chase a circle around a little grid. i can get the 1 square acting on 1 variable to come up, but the tutorial now wants me to create a list of variables that act under the same cl

Re: [Tutor] List-question

2005-12-19 Thread Terry Carroll
On Mon, 19 Dec 2005, Ed Singleton wrote: > On 19/12/05, Ed Singleton <[EMAIL PROTECTED]> wrote: > > > > list2 = list.copy() > > > > Slices create a copy, so a shortcut is: > > > > list2 = list[:] > > Sorry, you need to: > > from copy import copy > > before you can use copy. It should also be,

Re: [Tutor] List-question

2005-12-19 Thread Ed Singleton
On 19/12/05, Ed Singleton <[EMAIL PROTECTED]> wrote: > On 19/12/05, Øyvind <[EMAIL PROTECTED]> wrote: > > I have one function that finds some values. Then I want that function to > > find new values based on the values it found first. However, by just > > looping, it starts on an eternal job. > > >

Re: [Tutor] List-question

2005-12-19 Thread Ed Singleton
On 19/12/05, Øyvind <[EMAIL PROTECTED]> wrote: > I have one function that finds some values. Then I want that function to > find new values based on the values it found first. However, by just > looping, it starts on an eternal job. > > As illustrated in: > >>> list = [1,2,3] > >>> list2 = list > >

[Tutor] List-question

2005-12-19 Thread Øyvind
I have one function that finds some values. Then I want that function to find new values based on the values it found first. However, by just looping, it starts on an eternal job. As illustrated in: >>> list = [1,2,3] >>> list2 = list >>> list2 [1, 2, 3] >>> for i in list: ... print i ...

Re: [Tutor] New entry in the Tutor list - Question: Python and dbf files

2005-07-08 Thread Terry Carroll
On Fri, 8 Jul 2005, Alessandro Brollo wrote: > 1. Does a Python dbf reader/writer module exist > somewhere? A google on "python dbf" led me to a few promising leads: http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/362715 http://www.fiby.at/dbfpy/ http://www.garshol.priv.no/download/so

[Tutor] New entry in the Tutor list - Question: Python and dbf files

2005-07-08 Thread Alessandro Brollo
I'm using Python 2.3 in Win32/WinXP context. I'm new at all to newsgroups and discussion lists; the first help I need, is how to learn "good-manner" use of such very effective, but time-consuming tools. My approach will be a "try-and-error" one; I encourage all of you to send me any suggestion/obs