bowman at acsu.buffalo.edu
Thu Oct 12 22:15:02 CEST 2000
I am trying to output row and column indices in the following code:
row = -1
while(row < len(DataColumns)):
col = 0
row = row + 1
while(col < len(DataColumns)):
s = s + DataColumns[col][row] + ', '
col = col + 1
print '%d %d' % (col,row), r"\b\b\b\b\b\b\b"
(DataColumns has a total of 1272 numbers and I want to print it out as
106 rows by 12 columns)
In checking the while loops, I printed out the rows and column indices
while the while statements did their thing. But the printing comes at
the expense of new lines with each new row and col index.
As you can see from the print statement, I would like backspaces to be
printed (going back to the left origin) after col and row are printed
(no carriage returns or line feeds). Instead, I get \b\b\b\b\b\b\b
printed after col and row followed by a new line.
I have tried various arrangements of \b's in the print statement,
What am I missing?
Python 1.5.2 (#0, Apr 13 1999, 10:51:12)
[MSC 32 bit (Intel)] on win32
WinNT4.0 SP3, 48 MB RAM
More information about the Python-list