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


Groups > comp.lang.python > #102563

Re: realtime output and csv files

From Bernardo Sulzbach <mafagafogigante@gmail.com>
Newsgroups comp.lang.python
Subject Re: realtime output and csv files
Date 2016-02-05 19:51 -0200
Message-ID <mailman.23.1454709090.2317.python-list@python.org> (permalink)
References <n92ucb$1h5s$1@gioia.aioe.org> <mailman.13.1454702263.2317.python-list@python.org> <n9331n$1omq$1@gioia.aioe.org> <56B51065.2090104@gmail.com> <CAPM-O+zyt0RvT1aPf102+Hj6=cR_smDX=9kbCDetNUZoqz-9JQ@mail.gmail.com>

Show all headers | View raw


On 02/05/2016 07:43 PM, Joel Goldstick wrote:
>>>> print("%d, %2d:%2d, %.1f" % (1,10,24,20.4))
> 1, 10:24, 20.4

Let us be more careful there. Although CSV has no formal specification 
(according to the IETF), *those spaces are not good*.

It is **very unlikely** that they will cause issues, but 1,10:24,20.4 is 
*safer* and - to my eyes - better CSV.

I wouldn't be surprised if a parser treated a value as text only because 
it has spaces on it.

For OP, if you are going for this, I - personally - suggest sticking to 
"%d,%2d:%2d,%.1f".

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


Thread

realtime output and csv files lucan <lucan@NNN.it> - 2016-02-05 20:49 +0100
  Re: realtime output and csv files Bernardo Sulzbach <mafagafogigante@gmail.com> - 2016-02-05 17:57 -0200
    Re: realtime output and csv files lucan <lucan@NNN.it> - 2016-02-05 22:09 +0100
      Re: realtime output and csv files Bernardo Sulzbach <mafagafogigante@gmail.com> - 2016-02-05 19:13 -0200
      Re: realtime output and csv files Joel Goldstick <joel.goldstick@gmail.com> - 2016-02-05 16:43 -0500
      Re: realtime output and csv files Bernardo Sulzbach <mafagafogigante@gmail.com> - 2016-02-05 19:51 -0200
        Re: realtime output and csv files lucan <lucan@NNN.it> - 2016-02-06 14:40 +0100
      Re: realtime output and csv files Joel Goldstick <joel.goldstick@gmail.com> - 2016-02-05 17:12 -0500
  Re: realtime output and csv files Tim Chase <python.list@tim.thechases.com> - 2016-02-05 22:27 -0600
  Re: realtime output and csv files Bernardo Sulzbach <mafagafogigante@gmail.com> - 2016-02-06 02:53 -0200
  Re: realtime output and csv files Tim Chase <python.list@tim.thechases.com> - 2016-02-06 06:45 -0600

csiph-web