Looking for a Python Program/Tool That Will Add Line Numbers to a txt File

AnonMail2005 at gmail.com AnonMail2005 at gmail.com
Fri Feb 15 13:25:58 EST 2008


> See Subject. It's a simple txt file, each line is a Python stmt, but I need
> up to four digits added to each line with a space between the number field
> and the text. Perhaps someone has already done this or there's a source on
> the web for it. I'm not yet into files with Python. A sudden need has burst
> upon me. I'm using Win XP.

I'm not sure why you need the line numbers inserted into the file.
Alot of
editors will display and print line numbers.

My Visual Studio IDE displays file line numbers (it's an option) and
prints
them.  I believe there's a free Express Edition that you can download.

Also, check out http://www.textpad.com/ .  I think you can download an
evaluation copy.

HTH



More information about the Python-list mailing list