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


Groups > comp.lang.python > #62289

Re: Logger module in python

Date 2013-12-18 10:44 +0100
From Jean-Michel Pichavant <jeanmichel@sequans.com>
Subject Re: Logger module in python
Newsgroups comp.lang.python
Message-ID <mailman.4341.1387359863.18130.python-list@python.org> (permalink)

Show all headers | 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