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


Groups > comp.lang.python > #62289

Re: Logger module in python

Path csiph.com!usenet.pasdenom.info!goblin2!goblin.stu.neva.ru!newsfeed.xs4all.nl!newsfeed3.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Return-Path <prvs=057eee947=jeanmichel@sequans.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.003
X-Spam-Evidence '*H*': 0.99; '*S*': 0.00; 'python.': 0.02; 'url:pypi': 0.03; 'newbie': 0.05; 'output': 0.05; 'json': 0.07; 'wednesday,': 0.07; 'assuming': 0.09; 'subject:module': 0.09; 'python': 0.11; "'log'": 0.16; 'dumps': 0.16; 'format:': 0.16; 'readability': 0.16; 'readable': 0.16; 'utterly': 0.16; 'yaml': 0.16; 'subject:python': 0.16; 'wrote:': 0.18; 'module': 0.19; 'basically': 0.19; 'import': 0.22; 'file.': 0.24; "i've": 0.25; 'header:In-Reply-To:1': 0.27; 'to:2**1': 0.27; '----': 0.29; "i'm": 0.30; 'url:mailman': 0.30; 'perl': 0.31; 'pickle': 0.31; 'though.': 0.31; 'text': 0.33; 'url:python': 0.33; '-----': 0.33; 'december': 0.35; 'objects': 0.35; 'but': 0.35; 'there': 0.35; 'format.': 0.36; 'url:listinfo': 0.36; 'hi,': 0.36; 'url:org': 0.36; 'thank': 0.38; 'to:addr:python-list': 0.38; 'issue': 0.38; 'sure': 0.39; 'to:addr:python.org': 0.39; 'url:mail': 0.40; 'most': 0.60; 'you.': 0.62; 'email addr:gmail.com': 0.63; 'information': 0.63; 'received:194': 0.64; 'to:addr:gmail.com': 0.65; 'notice:': 0.67; 'person,': 0.68; 'privileged.': 0.69; 'disclose': 0.74; 'medium.': 0.91; '2013': 0.98
X-IronPort-AV E=Sophos;i="4.95,506,1384297200"; d="scan'208";a="2254553"
X-Virus-Scanned amavisd-new at zimbra.sequans.com
Date Wed, 18 Dec 2013 10:44:16 +0100 (CET)
From Jean-Michel Pichavant <jeanmichel@sequans.com>
To rusi <rustompmody@gmail.com>, python-list@python.org
In-Reply-To <51304f70-0c10-4de6-bce8-375aced049c4@googlegroups.com>
Subject Re: Logger module in python
MIME-Version 1.0
X-Mailer Zimbra 7.2.4_GA_2900 (ZimbraWebClient - GC31 (Win)/7.2.4_GA_2900)
Content-Type text/plain; charset="utf-8"
Content-Transfer-Encoding base64
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 <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>
Newsgroups comp.lang.python
Message-ID <mailman.4341.1387359863.18130.python-list@python.org> (permalink)
Lines 25
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1387359863 news.xs4all.nl 2875 [2001:888:2000:d::a6]:41472
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:62289

Show key headers only | View raw


---- Original Message -----
> On Wednesday, December 18, 2013 8:52:11 AM UTC+5:30,
> smileso...@gmail.com wrote:
> > Hi,
> >   I am a newbie in python. I am looking for a existing module which
> >   I can import in my program to log the objects to a file?
> 
> > I know there is a module Data::Dumper in perl which dumps the
> > objects to file. But not sure about python.
> 
> Assuming you are looking for a serialization format:
> If efficiency, easily-at-hand, standard are important then
> pickle better than json better than yaml
> 
> If however readability of the output (as the word 'log' suggests) is
> desired
> its the other way round: yaml is the most readable, pickle is utterly
> unreadable
> --
> https://mail.python.org/mailman/listinfo/python-list

There's a (better) alternative to pickle: serpent.
https://pypi.python.org/pypi/serpent

I've been told it was a standard module in python 3, I'm not sure though.
Basically it's pickle without the security issue and a readable text format.

JM


-- IMPORTANT NOTICE: 

The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.

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


Thread

Re: Logger module in python Jean-Michel Pichavant <jeanmichel@sequans.com> - 2013-12-18 10:44 +0100

csiph-web