[EMAIL PROTECTED] wrote: > Dear all, > > I am quite new to python. I would like to remove two lines from a file.
The canonical way to do so (at least for text files - which is the case here) is : open the source file in read mode open a tmp file in write mode for each line in source file: if this line should be kept: write it to the tmp file close both files replace source file with tmp file (snip) > I would like to call this as > > myscript targetfile > > I have read sth about command line arguments. Perhaps I can cope with > that myself but help is also appreciated on that. import sys print sys.argv -- bruno desthuilliers python -c "print '@'.join(['.'.join([w[::-1] for w in p.split('.')]) for p in '[EMAIL PROTECTED]'.split('@')])" -- http://mail.python.org/mailman/listinfo/python-list