Re: [Tutor] lists of lists: more Chutes & Ladders!

2013-12-30 Thread Keith Winston
Never mind, I figured out that the slice assignment is emptying the previous lists, before the .reset() statements are creating new lists that I then populate and pass on. It makes sense. On Tue, Dec 31, 2013 at 12:59 AM, Keith Winston wrote: > I resolved a problem I was having with lists, but

[Tutor] lists of lists: more Chutes & Ladders!

2013-12-30 Thread Keith Winston
I resolved a problem I was having with lists, but I don't understand how! I caught my code inadvertently resetting/zeroing two lists TWICE at the invocation of the game method, and it was leading to all the (gamechutes & gameladders) lists returned by that method being zeroed out except the final t

Re: [Tutor] same python script now running much slower

2013-12-30 Thread Danny Yoo
On Mon, Dec 30, 2013 at 5:27 PM, William Ray Wing wrote: > On Dec 30, 2013, at 7:54 PM, "Protas, Meredith" > wrote: > >> Thanks for all of your comments! I am working with human genome information >> which is in the form of many very short DNA sequence reads. I am using a >> script that sort

Re: [Tutor] same python script now running much slower

2013-12-30 Thread Steven D'Aprano
Hi Meridith, and welcome. On Mon, Dec 30, 2013 at 06:37:50PM +, Protas, Meredith wrote: > I am using a python script generated by another person. I have used > this script multiple times before and it takes around 24 hours to run. > Recently, I have tried to run the script again (the same

Re: [Tutor] same python script now running much slower

2013-12-30 Thread William Ray Wing
On Dec 30, 2013, at 7:54 PM, "Protas, Meredith" wrote: > Thanks for all of your comments! I am working with human genome information > which is in the form of many very short DNA sequence reads. I am using a > script that sorts through all of these sequences and picks out ones that > contain

Re: [Tutor] can't install

2013-12-30 Thread eryksun
On Mon, Dec 30, 2013 at 7:42 PM, Tobias M. wrote: > Yes, '~' is your home directory. You can actually use this in your > shell instead of typing the whole path. The tilde shortcut is a C shell legacy inspired by the 1970s ADM-3A terminal, which had "Home" and tilde on the same key. Python has os.

Re: [Tutor] same python script now running much slower

2013-12-30 Thread Keith Winston
It seems likely that mentioning what version of Python you're running it on might help in trouble-shooting... if you can run it on a subsection of your data, get it down to a workable amount of time (as in, minutes) and then put timers on the various sections to try to see what's taking so long. My

Re: [Tutor] can't install

2013-12-30 Thread Tobias M.
Quoting Lolo Lolo : Hi, can i ask why the name ~/my_venv/  .. is that just to indicate ~ as the home directory? The name was just an example. Yes, '~' is your home directory. You can actually use this in your shell instead of typing the whole path. You probably want to put virtual enviro

Re: [Tutor] same python script now running much slower

2013-12-30 Thread William Ray Wing
On Dec 30, 2013, at 1:37 PM, "Protas, Meredith" wrote: > Hi, > > I'm very new to python so I'm sorry about such a basic question. > > I am using a python script generated by another person. I have used this > script multiple times before and it takes around 24 hours to run. Recently, > I ha

Re: [Tutor] same python script now running much slower

2013-12-30 Thread Alan Gauld
On 30/12/13 18:37, Protas, Meredith wrote: I am using a python script generated by another person. I have used this script multiple times before and it takes around 24 hours to run. That's a long time by any standards. I assume its processing an enormous amount of data? Recently, I have t

[Tutor] same python script now running much slower

2013-12-30 Thread Protas, Meredith
Hi, I'm very new to python so I'm sorry about such a basic question. I am using a python script generated by another person. I have used this script multiple times before and it takes around 24 hours to run. Recently, I have tried to run the script again (the same exact command lines) and it

Re: [Tutor] Generator next()

2013-12-30 Thread spir
On 12/29/2013 12:33 PM, Steven D'Aprano wrote: def adder_factory(n): def plus(arg): return arg + n return plus # returns the function itself If you call adder_factory(), it returns a function: py> adder_factory(10) .plus at 0xb7af6f5c> What good is this? Watch carefully:

Re: [Tutor] Generator next()

2013-12-30 Thread spir
On 12/29/2013 01:38 PM, Steven D'Aprano wrote: >In the previous timer function that I was using, it defined a timer class, >and then I had to instantiate it before I could use it, and then it saved a >list of timing results. I think in yours, it adds attributes to each >instance of a function/met