Long Live Python!
phil hunt
philh at comuno.freeserve.co.uk
Wed Jul 11 18:32:19 EDT 2001
On Wed, 11 Jul 2001 12:10:43 -0600 (MDT), Bruce Sass <bsass at freenet.edmonton.ab.ca> wrote:
>On Wed, 11 Jul 2001, phil hunt wrote:
>> On Tue, 10 Jul 2001 15:31:11 -0700, Paul Prescod <paulp at ActiveState.com> wrote:
><...>
>> >Python does not have a niche and is not obviously a niche-friendly
>> >language.
>>
>> Sure it does: python's niche is as a scripting language that's also good
>> for longer programs.
>
>Hehe, you must have missed the recent thread about removing the first
>line from a text file...
Yes, I did. How about:
stdin.readline() #throw away first line
stdout.write(stdin.read()) #send the rest to stdout
or:
stdin.readline() #throw away first line
while 1:
l = stdin.readline()
if l == "": break
stdout.write(stdin.readline())
--
## Philip Hunt ## philh at comuno.freeserve.co.uk ##
More information about the Python-list
mailing list