print there!

Fredrik Lundh fredrik at pythonware.com
Wed Sep 21 09:01:19 CEST 2005


Godwin Burby wrote:

> i think u've misunderstood my question. Your solution will print on a
> new line as below:
> c:\godwin\bl.csv 1
> c:\godwin\bl.csv 2
> c:\godwin\bl.csv 3
> But i want this number to diplay their value increase on the same line
> on the same sport itself without printing the filename multiple times
> on multiple lines:

I think u've misunderstood the answer.

    filename = 'c:\\godwin\\bl.csv'
    for i,row in enumerate(reader):
        # inserts or updates the database
        print "\r" + filename, i, # <-- notice the trailing comma
    print

</F>






More information about the Python-list mailing list