How to get rid the new line

Bjorn Pettersen BPettersen at NAREX.com
Sun Jun 30 18:07:18 EDT 2002


> From: Frank Tobin [mailto:ftobin at neverending.org] 
> 
> Bjorn Pettersen, on 2002-06-30, wrote:
> 
> > I submitted a patch for this (that handled mac, win, and unix line
> > endings) but it was declined by the BDFL. I suspect one of 
> > the reasons were that I named it chomp...
> 
> sed s/chomp/bite/ < patch | mail python-bugs-list at python.org

I believe in CVS Python you can say 

  line = line.rstrip('\n')

to get a sufficiently similar effect to chomp.

2.3-will-be-out-any-day-now-<wink>'ly y'rs
-- bjorn





More information about the Python-list mailing list