Skip to content

Commit

Permalink
fix type and method err for Python3
Browse files Browse the repository at this point in the history
  • Loading branch information
xuao575 committed Sep 22, 2022
1 parent af7510c commit 27639c2
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions wrappers/python/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,16 +91,16 @@ try:

# Print a simple text-based representation of the image, by breaking it into 10x20 pixel regions and approximating the coverage of pixels within one meter
coverage = [0]*64
for y in xrange(480):
for x in xrange(640):
for y in range(480):
for x in range(640):
dist = depth.get_distance(x, y)
if 0 < dist and dist < 1:
coverage[x/10] += 1
coverage[x//10] += 1

if y%20 is 19:
line = ""
for c in coverage:
line += " .:nhBXWW"[c/25]
line += " .:nhBXWW"[c//25]
coverage = [0]*64
print(line)

Expand Down

0 comments on commit 27639c2

Please sign in to comment.