Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #45912

Re: suppress newlines in my script

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!eweka.nl!lightspeed.eweka.nl!194.134.4.91.MISMATCH!news2.euro.net!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <davea@davea.name>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.034
X-Spam-Evidence '*H*': 0.93; '*S*': 0.00; 'subject:script': 0.09; '(assuming': 0.16; 'commas,': 0.16; 'csv': 0.16; 'newlines': 0.16; 'wrote:': 0.18; 'library': 0.18; 'module': 0.19; 'file,': 0.19; 'later': 0.20; 'seems': 0.21; 'print': 0.22; 'header:User- Agent:1': 0.23; "aren't": 0.24; 'url:moin': 0.24; 'switch': 0.26; 'header:In-Reply-To:1': 0.27; 'point': 0.28; 'am,': 0.29; "doesn't": 0.30; 'code': 0.31; 'that.': 0.31; 'url:wiki': 0.31; 'url:python': 0.33; '"the': 0.34; 'maybe': 0.34; 'problem.': 0.35; 'really': 0.36; 'module.': 0.36; 'thanks': 0.36; 'url:org': 0.36; 'solving': 0.38; 'to:addr:python-list': 0.38; 'to:addr:python.org': 0.39; "you're": 0.61; 'email addr:gmail.com': 0.63; 'believe': 0.68; 'received:74.208': 0.68; 'received:74.208.4.194': 0.84
Date Fri, 24 May 2013 15:24:26 -0400
From Dave Angel <davea@davea.name>
User-Agent Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130510 Thunderbird/17.0.6
MIME-Version 1.0
To python-list@python.org
Subject Re: suppress newlines in my script
References <52c74908-8bac-498e-9549-5b9500b152f1@googlegroups.com> <b52fcbed-3ea6-4352-99de-c6274c557016@googlegroups.com>
In-Reply-To <b52fcbed-3ea6-4352-99de-c6274c557016@googlegroups.com>
Content-Type text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding 7bit
X-Provags-ID V02:K0:72R16Otsb+LyBvEgm1nB6yEH5T6uTeHPpm5If26osZe jQWnLRsp1gWBradRkryiy9i0y7fxNZoZheQl+0mROt4KOWcVUF YCAiVqgZCAW7dRezXnH9jF0PjltbyoSVYryTtxlh+G/pZhq70w hVcdkaqLEkllwol524c5phMECdJffQGsS1NdgNvdVXafYZ4EFw A1PLpYorkBdsBiuSiHNX4yvIjIhWo2eGUI6O29qnQyUjNTNM14 bWricnPqNMP4agrBa8754SPcMHv413BBmb2tU/QySFroHuWpKG c9Szxo6CxDy3DAu/k7iqpuJETMfseSn/rV0vBajaKpIR/LxJAs cIKgpKawibKtWix/tTjo=
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.2074.1369423480.3114.python-list@python.org> (permalink)
Lines 23
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1369423480 news.xs4all.nl 15887 [2001:888:2000:d::a6]:52584
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:45912

Show key headers only | View raw


On 05/24/2013 09:59 AM, sloan949@gmail.com wrote:
>
              <SNIP massive double-spaced nonsense from googlegroups misuse,
          see   http://wiki.python.org/moin/GoogleGroupsPython >


>>   print PE2.format(count)
>
> Thanks for the tip about the CSV module.  I did not know about that.

So why aren't you using it?  There's not much point in solving "the 
newlines problem" if you're going to later switch to a library which 
doesn't have the problem.  The csv module will eliminate the newlines, 
and the commas, organizing your data for you directly (assuming this 
really is a csv file, and that the separator is comma).  None of your 
present code seems to believe it's a csv file, so maybe that's just a 
misdirection.




-- 
DaveA

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

suppress newlines in my script sloan949@gmail.com - 2013-05-23 13:49 -0700
  Re: suppress newlines in my script Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2013-05-23 19:11 -0400
  Re: suppress newlines in my script sloan949@gmail.com - 2013-05-24 06:59 -0700
    Re: suppress newlines in my script Dave Angel <davea@davea.name> - 2013-05-24 15:24 -0400
    Re: suppress newlines in my script Jason Friedman <jsf80238@gmail.com> - 2013-05-24 21:49 -0600
    Re: suppress newlines in my script Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2013-05-25 13:33 -0400

csiph-web