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


Groups > comp.lang.python > #5502

Re: Convert AWK regex to Python

Path csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!aioe.org!feeder.news-service.com!newsfeed.xs4all.nl!newsfeed5.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Return-Path <rosuav@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.001
X-Spam-Evidence '*H*': 1.00; '*S*': 0.00; 'subject:Python': 0.04; 'python.': 0.05; 'dictionary': 0.07; 'python': 0.07; 'dict': 0.09; 'storing': 0.09; 'pm,': 0.11; 'wrote:': 0.14; 'awk': 0.16; 'retrieving': 0.16; 'subject:Convert': 0.16; 'subject:regex': 0.16; '16,': 0.16; 'intermediate': 0.16; 'this?': 0.18; 'header :In-Reply-To:1': 0.22; 'mon,': 0.22; 'received:209.85.214.174': 0.23; 'received:mail-iw0-f174.google.com': 0.23; 'chris': 0.27; 'message-id:@mail.gmail.com': 0.28; 'to:addr:python-list': 0.32; 'data': 0.37; 'received:209.85': 0.37; 'received:google.com': 0.38; 'received:209.85.214': 0.39; 'to:addr:python.org': 0.39; 'received:209': 0.39; 'how': 0.39; 'header:Received:5': 0.40; '2011': 0.62; 'correctly?': 0.84
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type; bh=mBJ4maFA93FrYT9JN96zq7wfXQjk5RScTTyK7tOHmac=; b=ZWj4d3EmQlZs1FZZ4Mpt7gle1zi6VcvfpU+vWHW5Qw97MOI4rn1X5WRjSjwTugTi37 pNM5ccIIXTfzatfwA2O4ePxBKvl9HZUrVdfIKCb7sA0lvKhDxshuDKQRytD3Q0wf6PdM YGRaDW3Yuzyv7QYGxkVTi2WbzYpUz+gP6NLiU=
DomainKey-Signature a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=MZK9p3HTCzOSnL/C/7UIBCwC8Y876K17iXXfeniX2QGE57G5w60dDlErFrAp9kUNw4 NuxdQyWkQyTmxtyvUHeh0NOkN5x9dDsFyWemeB5iprjXwpvG8EAozykIJ2njz+8uCblU f0g8GSxFh47kCeSWgFEbmFCXzBkAnfiklxFv8=
MIME-Version 1.0
In-Reply-To <0426dbb3-178c-42ac-aebc-29603b3b3bce@glegroupsg2000goo.googlegroups.com>
References <mailman.1633.1305534667.9059.python-list@python.org> <0426dbb3-178c-42ac-aebc-29603b3b3bce@glegroupsg2000goo.googlegroups.com>
Date Mon, 16 May 2011 18:46:51 +1000
Subject Re: Convert AWK regex to Python
From Chris Angelico <rosuav@gmail.com>
To python-list@python.org
Content-Type text/plain; charset=ISO-8859-1
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.12
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <http://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 <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.1635.1305535614.9059.python-list@python.org> (permalink)
Lines 9
NNTP-Posting-Host 82.94.164.166
X-Trace 1305535614 news.xs4all.nl 81473 [::ffff:82.94.164.166]:49219
X-Complaints-To abuse@xs4all.nl
Xref x330-a1.tempe.blueboxinc.net comp.lang.python:5502

Show key headers only | View raw


On Mon, May 16, 2011 at 6:43 PM, J <jnr.gonzalez@googlemail.com> wrote:
> Good morning Angelico,
> Do I understand correctly? Do you mean incorporating a Python dict inside the AWK command? How can I do this?

No, inside Python. What I mean is that you can achieve the same
uniqueness requirement by simply storing the intermediate data in a
dictionary and then retrieving it at the end.

Chris Angelico

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


Thread

Re: Convert AWK regex to Python J <jnr.gonzalez@googlemail.com> - 2011-05-16 01:43 -0700
  Re: Convert AWK regex to Python Chris Angelico <rosuav@gmail.com> - 2011-05-16 18:46 +1000

csiph-web