Re: delete first line in a file



Juergen Huber wrote:
but...how can i say python, delete the first line?!
thats my problem!

You can open the file, read its lines with readlines function ( that return a list), so make your modifies and save to another file.

Now, do you know how to work with lists?

http://python.org/doc/2.4.2/tut/node5.html#SECTION005140000000000000000

and now you have only to wrote it

http://python.org/doc/2.4.2/tut/node9.html#SECTION009200000000000000000

Michele
.



Relevant Pages

  • Re: Men more likely to produce good writing
    ... Thats long been done here. ... Google on the sales figures of ... " romance novels ", they sell abhorrantly much. ... I guess that you haven't really looked at her lists. ...
    (soc.men)
  • Re: NetworkManager update
    ... developers can get into the same mindset. ... I thought I did, having bought this lappy 3 weeks before the day I leave on this trip, but thats pretty much evaporated, rather silently it seems, now. ... The net result being that most pretty well know which side of a scrap I'll be rooting for, on those lists where I have been active for extended periods of time & that goes clear back to the coco list on Delphi in the 80's. ...
    (Fedora)
  • easy money
    ... Yes, thats right, only 5. ... additional postings with your name at #4, ... NEED TO CHEAT THE BASIC IDEA TO MAKE THE BUCKS! ... people added him to their lists and in 4-5 weeks he ...
    (misc.consumers)
  • Re: Need Help: Setup up a Craigslist-like email forwarding server
    ... but thats not too hard. ... Actually, since you brought this to my attention, the address space is ... well the other solutions lead to the above headache, ... lists the center of the language - kt ...
    (comp.lang.lisp)
  • Re: [SLE] [owner] List migrations
    ... mailinglists on the server. ... Thats why each lists name start with the ... what the difference beetween kde as project or as topic? ... Thats why i thought we might introduce them. ...
    (SuSE)