[Tutor] odd bug
christopher.henk at gm.com
christopher.henk at gm.com
Fri Jul 20 15:37:53 CEST 2007
try adding:
print "current block:", one_char_box
print "zeros: ", zero_count
to the lines just below your if statement that you think is called only
once. This way you know how many times its called and you might be able
to find the error.
Chris Henk
Allison Transmission
phone: 317.242.2569
fax: 317.242.3469
e-mail: christopher.henk at gm.com
"elis aeris" <hunter92383 at gmail.com>
Sent by: tutor-bounces at python.org
07/20/2007 02:36 AM
To
"Luke Paireepinart" <rabidpoobear at gmail.com>
cc
python tutor <tutor at python.org>
Subject
[Tutor] odd bug
I ran the code attached at the end of the email, it' supposed to out put a
string of characters,
yet I got only this
#######
2.4.3.3.8.5.
definition check:
3
#######
now, it's proper output, however, this part got run only once, when it's
supposed to run multiple times to produce more portions like the one
above, i don't know why this part got run only once:
when that happens
if box_v == 0:
zero_count = zero_count + 1
if zero_count == 2:
zero_count = 0
if one_char_box in
loc_window_loc_definition:
print one_char_box
box_string = box_string +
str(loc_window_loc_definition
[one_char_box])
print "definition check:"
print box_string
######################
for b in range(1,50,1):
## Next point to check
x = radar_loc_window_xx + b
y = radar_loc_window_yy
## omit 0 when there are 2 zeros, and check def
when that happens
if box_v == 0:
zero_count = zero_count + 1
if zero_count == 2:
zero_count = 0
if one_char_box in
loc_window_loc_definition:
print one_char_box
box_string = box_string +
str(loc_window_loc_definition
[one_char_box])
print "definition check:"
print box_string
else:
one_char_box = one_char_box + str(box_v) + "."
box_v = 0
for a in range(0,10,1):
r, g, b = pixels[1030*(y-a) + x]
if g > r and g > b:
box_v = box_v + 1
_______________________________________________
Tutor maillist - Tutor at python.org
http://mail.python.org/mailman/listinfo/tutor
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/tutor/attachments/20070720/c1f820ba/attachment.htm
More information about the Tutor
mailing list