Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #79168
| From | Shiva <shivaji_tn@yahoo.com> |
|---|---|
| Subject | Creating a counter |
| Date | 2014-10-15 18:39 +0000 |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.14888.1413398369.18130.python-list@python.org> (permalink) |
Hi, I am trying to search a string through files in a directory - however while Python script works on it and writes a log - I want to present the user with count of number of strings found. So it should increment for each string found. How do I implement it? If I use a print() within a if condition statement - and execute the script in terminal - for each find, the print() prints in new line instead of a constantly incrementing counter. Thanks, Shiva
Back to comp.lang.python | Previous | Next — Next in thread | Find similar | Unroll thread
Creating a counter Shiva <shivaji_tn@yahoo.com> - 2014-10-15 18:39 +0000
Re: Creating a counter Simon Kennedy <sffjunkie@gmail.com> - 2014-10-16 06:44 -0700
Re: Creating a counter Ian Kelly <ian.g.kelly@gmail.com> - 2014-10-16 08:04 -0600
Re: Creating a counter Simon Kennedy <sffjunkie@gmail.com> - 2014-10-16 07:12 -0700
csiph-web