bhaaluu wrote:
> Greetings,
> Thanks for including the complete source code!
> It really helps to have something that works to look at.
> I modified an earlier version of this to run on my
> computer (GNU/Linux; Python 2.4.3).
>   
I think the best strategy for this problem would be to build an index of 
the offset of the start of each line, and then randomly select from this 
list.
that makes each line equally probable, and you can set up your class so 
that the index is only built on the first call to the function.
-Luke

_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to