[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.python

Re: Strip lines from files

Jeroen Ruigrok van der Werven

1/8/2008 8:59:00 AM

-On [20080108 09:40], Francesco Pietra (chiendarret@yahoo.com) wrote:
>A variant need has now emerged, to perform the same task from a very long
>series of shorter files trp.pdb.1, trp.pdb.2 ,..... Could you see how to adapt
>the above script to the new need?

Look at sys.argv and pass the list of files to your script as a wildcard:

../myscript.py trp.pdb.*

And iterate over every argv you have to strip the WAT.

--
Jeroen Ruigrok van der Werven <asmodai(-at-)in-nomine.org> / asmodai
ã?¤ã?§ã?«ã?¼ã?³ ã?©ã?¦ã??ã?­ã??ã?¯ ã?´ã?¡ã?³ ã??ã?« ã?¦ã?§ã?«ã?´ã?§ã?³
http://www.in-n... | http://www.ra...
The wisdom of the wise, and the experience of ages, may be preserved by
quotations...