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


Groups > comp.lang.python > #102563

Re: realtime output and csv files

Path csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail
From Bernardo Sulzbach <mafagafogigante@gmail.com>
Newsgroups comp.lang.python
Subject Re: realtime output and csv files
Date Fri, 5 Feb 2016 19:51:19 -0200
Lines 15
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>
Mime-Version 1.0
Content-Type text/plain; charset=windows-1252; format=flowed
Content-Transfer-Encoding 7bit
X-Trace news.uni-berlin.de gZFBNLwCAXXmxT0SYuGICgPhrFjoXelzshuqI6pNAB4w==
Return-Path <mafagafogigante@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.113
X-Spam-Level *
X-Spam-Evidence '*H*': 0.78; '*S*': 0.00; 'csv': 0.09; 'subject:files': 0.09; 'suggest': 0.15; 'received:io': 0.16; 'received:psf.io': 0.16; 'wrote:': 0.16; "wouldn't": 0.16; 'parser': 0.22; 'header:In-Reply-To:1': 0.24; 'header:User- Agent:1': 0.26; 'spaces': 0.29; 'there.': 0.30; 'surprised': 0.33; 'message-id:@gmail.com': 0.34; 'received:google.com': 0.35; 'text': 0.35; 'but': 0.36; 'received:209.85': 0.36; 'to:addr :python-list': 0.36; 'pm,': 0.36; 'subject:: ': 0.37; 'received:localhost.localdomain': 0.38; 'received:209': 0.38; 'received:localdomain': 0.38; 'to:addr:python.org': 0.40; 'personally': 0.61; 'charset:windows-1252': 0.62; 'more': 0.63; 'eyes': 0.70; '(according': 0.84; 'careful': 0.91; 'joel': 0.91
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-type:content-transfer-encoding; bh=HQtOi0vywul7PAMCUaMLbc+Yj7xRzVUsSFqeor97sSc=; b=XTDMna4JtIwY6mKVEZ4WFioyeEcz3G/RpNK1CLWdy2b32HJRtGvhLmSy5S4JF4VZoO ZngAgwEB/oHlxpSVHgd2nxXb/+pJ2h8EaE7ioxYyKA8+KbkrDJR0ALFXuHjfmJ88/SLo CJwJY8PLT+7Ilx+nsIBWxogfBbtMSomjpbj8xyjwZRZwsZq0JEAR/Rc7EEursQvF0eh0 uCIBAM+gpfz2D7Wf2z08L6b6iQZvCdQPtE1+k64BpDjOGLqFwc2OcGLt69GGuY1N5Dql DCG1phqFbw3WWoTv66oob4sFPuqTo76Q2H9W4uGDsZnWG5PgSBvKFt8lV0T/7L6ANWGw 2GVw==
X-Google-DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-type :content-transfer-encoding; bh=HQtOi0vywul7PAMCUaMLbc+Yj7xRzVUsSFqeor97sSc=; b=QLDLhThrP5kUaT0ewOr94gX206hv27glLqPOioMMlW2NRs5gKXccCuA7fVblbpk5kn BzGkhij3SZFs+JWO+frWQ4It42+LzMI0CAi4yFGbAGZPYcBtqnO2NOOrUDmuILDXr2LP ZT9PpH/5KlE3rwRyxXKTM2QxD3VdAhNXpiMueFFAvLYjddw50nMLJ2BF529LdQ+nXwCL PETBF2qH/QmyPH5hdgf5BZF3/Cm6BUg+Yaw4LHi+2ipIM8NR2xcACEzCdUcbjO6Nqffe xcLOJzbSBufvYNf6WZuU/OOpsTuNDQ3uSuS/Zr00KmYUuwMZr6c0pmYZ4wuTgVBH4B0Y Od4Q==
X-Gm-Message-State AG10YOSeKMWvV4WfshgQmkzOQVaSwDgLEelm3z49nK6VWyte5wcg1+WQu6+dqMMGuZ74vQ==
X-Received by 10.140.28.133 with SMTP id 5mr12696726qgz.79.1454709082675; Fri, 05 Feb 2016 13:51:22 -0800 (PST)
User-Agent Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.5.0
In-Reply-To <CAPM-O+zyt0RvT1aPf102+Hj6=cR_smDX=9kbCDetNUZoqz-9JQ@mail.gmail.com>
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.21rc2
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <https://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 <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Xref csiph.com comp.lang.python:102563

Show key headers only | 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