delete first line in a file

Schüle Daniel uval at
Fri Jun 30 13:30:45 CEST 2006

Juergen Huber schrieb:
> Fredrik Lundh wrote:
>> Juergen Huber wrote:
>>> ok...i thought as much, that i have to copy this file!
>>> how will i do that?!
>>> how will i fix this file => delete the first line?!
>>> with which commands could i do that?!
>> start here:
>> </F>
> that documentation i have already read, but it wouldn`t help me for my
> problem!
> i know, how i can read the first line an print them on the screen!
> can i say python, delete the first line?!
> thats my problem!
> in the entry of my posting i wrote, that i am a newbie and so please
> understand me, that i ask so questions?! :-)
> thanks for your help!


f = file("old.file")
ignore = f.readline()
file("new.file", "w+").write(

hth, Daniel

More information about the Python-list mailing list