Path: csiph.com!usenet.pasdenom.info!gegeweb.org!de-l.enfer-du-nord.net!feeder1.enfer-du-nord.net!feeds.phibee-telecom.net!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.047 X-Spam-Evidence: '*H*': 0.91; '*S*': 0.00; 'converts': 0.07; 'strings.': 0.07; 'python': 0.09; 'fetch': 0.09; 'cc:addr:python- list': 0.10; 'stored': 0.10; 'describing': 0.16; 'eval': 0.16; 'reasonably': 0.16; 'wrote:': 0.17; 'certainly': 0.17; 'thanks.': 0.21; 'subject:problem': 0.22; 'work,': 0.22; 'cc:2**0': 0.23; 'cc:no real name:2**0': 0.24; 'cc:addr:python.org': 0.25; 'header :In-Reply-To:1': 0.25; 'header:User-Agent:1': 0.26; 'leave': 0.26; 'convert': 0.29; 'objects': 0.29; 'probably': 0.29; 'up.': 0.31; 'problem': 0.33; 'pm,': 0.35; 'but': 0.36; 'data.': 0.36; "didn't": 0.36; 'subject:with': 0.36; 'data': 0.37; 'subject:: ': 0.38; 'mark': 0.38; 'store': 0.38; 'some': 0.38; 'received:192': 0.39; 'received:192.168': 0.40; 'your': 0.60; 'networking': 0.60; 'most': 0.61; 'back': 0.62; 'information': 0.63; 'making': 0.64; 'header:Reply-To:1': 0.68; 'social': 0.69; 'received:74.208': 0.71; 'reply-to:no real name:2**0': 0.72; 'methodology.': 0.84; 'received:74.208.4.194': 0.84; 'lucky': 0.96 Date: Mon, 05 Nov 2012 23:42:42 -0500 From: Dave Angel User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:16.0) Gecko/20121011 Thunderbird/16.0.1 MIME-Version: 1.0 To: Wincent Subject: Re: problem with eval and time References: <932c348a-2670-44f0-a38b-4fddae577a0e@googlegroups.com> <43fc26d7-50f4-470a-9d02-3b3e27271b63@nl3g2000pbc.googlegroups.com> <0963c058-5ba2-474b-8a18-6d3decb5889c@googlegroups.com> In-Reply-To: <0963c058-5ba2-474b-8a18-6d3decb5889c@googlegroups.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Provags-ID: V02:K0:aQIr75vJvF/x0kb5L0VB5jmUyQeaF9ssGZRaJmW/FI3 RZNqBxni6r17PqFmJpZiaM2m9m73PfQeXkr0+3K9q2Wlb/PDZz nRAxB+w3PwA9B7wwLnWM0F0j6edt2Ptu6NMgStBgshwFA1JOKh nMGtoXpdVoikFnL4OHO5PMp5S6PXFW4lrLymF9pk5JoqeOrit8 NTk6FQOnv4oCCSniWqsEuwYL2Tj889/rpKD4uSdEB/Kv0v3pqu agpHq4venohSsrVFTcC50/IPA2umEVUEAv5MIrN6uW+EyZ8Qfk SwkgOB90qixZ+sGMxCd2X4skorm3r/EfWkn7WN9twJLcMu6tg= = Cc: python-list@python.org X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: d@davea.name List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 26 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1352176985 news.xs4all.nl 6917 [2001:888:2000:d::a6]:37742 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:32800 On 11/05/2012 11:29 PM, Wincent wrote: (Please don't top-post. it messes everything up. And your use of Google-groups is making everything double-spaced) > Thanks. > > I fetch data from social networking sites and want to mark the time of access. I store all the information in a redis database, which converts everything into strings and I need to convert those strings back to original python objects when analyzing the data. > Then restate your problem in terms of describing these strings. Apparently you don't get them from str(time.localtime()), but from some redis methodology. To convert most reasonable strings back to a date/time, you can probably use strftime. But you certainly cannot reasonably use eval. You're lucky it didn't work, so you didn't leave it that way. Eval on data stored in some database? You gotta be kidding. -- DaveA