Re: Nested For loop not running full

2013-04-26 Thread inshu chauhan
, 2013 at 3:15 PM, Chris Angelico wrote: > On Fri, Apr 26, 2013 at 7:36 PM, inshu chauhan > wrote: > > > > On Fri, Apr 26, 2013 at 2:39 PM, Peter Otten <__pete...@web.de> wrote: > >> > >> f = open(...) > >> > >> in the code you are not showing with > >> > >> f == list(open(...)) > > > > f is jus

Re: Nested For loop not running full

2013-04-26 Thread Jens Thoms Toerring
inshu chauhan wrote: > I have this part of my code where I am trying to traverse over an image by > running a for loop for both x and y co-ordinate axis. But the loop is > terminating by just reading first pixel. Can think of a reason why this is > happening ? > The code is: > for sy in xrange(0,

Re: Nested For loop not running full

2013-04-26 Thread Peter Otten
inshu chauhan wrote: > On Fri, Apr 26, 2013 at 2:39 PM, Peter Otten <__pete...@web.de> wrote: > >> inshu chauhan wrote: >> >> > I have this part of my code where I am trying to traverse over an image >> by >> > running a for loop for both x and y co-ordinate axis. But the loop is >> > terminating

Re: Nested For loop not running full

2013-04-26 Thread Chris Angelico
On Fri, Apr 26, 2013 at 7:36 PM, inshu chauhan wrote: > > On Fri, Apr 26, 2013 at 2:39 PM, Peter Otten <__pete...@web.de> wrote: >> >> f = open(...) >> >> in the code you are not showing with >> >> f == list(open(...)) > > f is just a text file(csv format).. so why list ?? (That should be =, not

Re: Nested For loop not running full

2013-04-26 Thread Oscar Benjamin
On 26 April 2013 10:36, inshu chauhan wrote: > > On Fri, Apr 26, 2013 at 2:39 PM, Peter Otten <__pete...@web.de> wrote: >> >> My crystal ball says that the 'for sy...' and 'for sx...' loops are >> running >> to completion, but you don't get the coordinates printed because you put >> them into the

Re: Nested For loop not running full

2013-04-26 Thread inshu chauhan
On Fri, Apr 26, 2013 at 2:39 PM, Peter Otten <__pete...@web.de> wrote: > inshu chauhan wrote: > > > I have this part of my code where I am trying to traverse over an image > by > > running a for loop for both x and y co-ordinate axis. But the loop is > > terminating by just reading first pixel. Ca

Re: Nested For loop not running full

2013-04-26 Thread Terry Jan Reedy
On 4/26/2013 4:48 AM, inshu chauhan wrote: Hello everyone, I have this part of my code where I am trying to traverse over an image by running a for loop for both x and y co-ordinate axis. But the loop is terminating by just reading first pixel. Can think of a reason why this is happening ? *A*

Re: Nested For loop not running full

2013-04-26 Thread Peter Otten
inshu chauhan wrote: > I have this part of my code where I am trying to traverse over an image by > running a for loop for both x and y co-ordinate axis. But the loop is > terminating by just reading first pixel. Can think of a reason why this is > happening ? > > The code is: > for sy in xrange(

Nested For loop not running full

2013-04-26 Thread inshu chauhan
Hello everyone, I have this part of my code where I am trying to traverse over an image by running a for loop for both x and y co-ordinate axis. But the loop is terminating by just reading first pixel. Can think of a reason why this is happening ? The code is: for sy in xrange(0, segimage.height)