Re: [Tutor] Error in Game

2013-07-03 Thread bob gailer
On 7/2/2013 4:22 PM, Jack Little wrote: I know the code is correct As Joel said- how could it be, since you do not get the desired results? When posting questions tell us: - what version of Python? - what operating system? - what you use to edit (write) your code - what you do to run your code

Re: [Tutor] memory consumption

2013-07-03 Thread Steven D'Aprano
On 04/07/13 04:17, Andre' Walker-Loud wrote: Hi All, I wrote some code that is running out of memory. How do you know? What are the symptoms? Do you get an exception? Computer crashes? Something else? It involves a set of three nested loops, manipulating a data file (array) of dimension

Re: [Tutor] memory consumption

2013-07-03 Thread Dave Angel
On 07/03/2013 02:17 PM, Andre' Walker-Loud wrote: Hi All, I wrote some code that is running out of memory. And you know this how? What OS are you using, and specifically how is it telling you that you've run out of memory? And while you're at it, what version of Python? And are the OS and

Re: [Tutor] memory consumption

2013-07-03 Thread Alan Gauld
On 03/07/13 19:17, Andre' Walker-Loud wrote: Your terminology is all kixed up and therefore does not make sense. WE definitely need to know more about the my_class module and do_stuff # generic code skeleton # import a class I wrote to utiliz

[Tutor] Cleaning up output

2013-07-03 Thread bjames
I've written my first program to take a given directory and look in all directories below it for duplicate files (duplicate being defined as having the same MD5 hash, which I know isn't a perfect solution, but for what I'm doing is good enough) My problem now is that my output file is a rather con

Re: [Tutor] Cleaning up output

2013-07-03 Thread Dave Angel
On 07/03/2013 03:51 PM, bja...@jamesgang.dyndns.org wrote: I've written my first program to take a given directory and look in all directories below it for duplicate files (duplicate being defined as having the same MD5 hash, which I know isn't a perfect solution, but for what I'm doing is good e

Re: [Tutor] memory consumption

2013-07-03 Thread Alan Gauld
On 03/07/13 20:50, Andre' Walker-Loud wrote: # loop over parameters and fill array with desired output for i in range(loop_1): for j in range(loop_2): for k in range(loop_3): How big are loop_1, loop_2, loop_3? The sizes of the loops are not big len(loop_1) = 20 len(loop_2) = 1

Re: [Tutor] memory consumption

2013-07-03 Thread Steven D'Aprano
On 04/07/13 08:11, Andre' Walker-Loud wrote: Yes, I was being sloppy. My later post clarified what I meant. The loops are really lists, and I was really using enumerate() to get both the iter and the element. loop_2 = [1,2,4,8,16,32,64,128,256,512,1024] for i,n in enumerate(loop_2): ...

Re: [Tutor] memory consumption

2013-07-03 Thread Steven D'Aprano
On 04/07/13 09:24, Oscar Benjamin wrote: On 3 July 2013 23:37, Andre' Walker-Loud wrote: Hi Oscar, Hi Andre', (your name shows in my email client with an apostrophe ' after it; I'm not sure if I'm supposed to include that when I write it). I expect that it's meant to be André, since that i