Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!us.feeder.erje.net!news2.arglkargh.de!nuzba.szn.dk!pnx.dk!news.stack.nl!newsfeed.xs4all.nl!newsfeed3.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.086 X-Spam-Evidence: '*H*': 0.83; '*S*': 0.00; 'formatting': 0.07; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'hits': 0.16; 'subject:Formatting': 0.16; 'wrote:': 0.17; 'fix': 0.17; 'creates': 0.18; 'jan': 0.18; "python's": 0.23; 'header:In- Reply-To:1': 0.25; 'am,': 0.27; 'message-id:@mail.gmail.com': 0.27; 'options': 0.27; 'probably': 0.29; "i'm": 0.29; 'code': 0.31; 'problem.': 0.32; 'to:addr:python-list': 0.33; "can't": 0.34; 'received:google.com': 0.34; 'doing': 0.35; 'received:209.85': 0.35; 'but': 0.36; 'anything': 0.36; 'why': 0.37; 'rather': 0.37; 'received:209': 0.37; 'subject:: ': 0.38; 'to:addr:python.org': 0.39; 'google': 0.39; 'your': 0.60; 'skip:u 10': 0.60; "you'll": 0.62; 'solve': 0.62; 'bothered': 0.65; '2013': 0.84; 'escaping': 0.84; 'subject:value': 0.84 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:content-type; bh=yZsBzogXbbr3gn6lf7nKHXHnKdV5Y+h5LibrgnNFqwk=; b=KcsjeupgaFtV/bNrHaLyLs/oi5piqr9cxDZglp2caLSvGt/eoVKNx3bBdBC/jel9gG z2htx/r3SJWyzLSXo3u5zC4WUjSno1WruXKJQ1pE3a1vos7RTPtXjsdgGATPIw6ejj1g 9Y7jozC+KS0LbWufW8noup/2ujD0TO/toJNlomBj9Bwmi1t0jHmN5RKg2uFx6Bh5Cgk4 XqQgqJY8hUx2Fjv5WtMQZx0FmrjGlnBScqvxhFNN3m65d3XH3ryy2Ni71kFtZgMUL9iv shJtttniRjk+ojGMe4eKUCsdrpLJ5wamIgxvuSQspGiJbaJz1bcilQhZ2D9OI8vjSYsd g0kQ== MIME-Version: 1.0 X-Received: by 10.52.178.225 with SMTP id db1mr9387380vdc.10.1359238718176; Sat, 26 Jan 2013 14:18:38 -0800 (PST) In-Reply-To: References: <6ad78df4-0ec0-4760-8f5a-5ecf129c5e65@googlegroups.com> Date: Sun, 27 Jan 2013 09:18:38 +1100 Subject: Re: Formatting a column's value output From: Chris Angelico To: python-list@python.org Content-Type: text/plain; charset=ISO-8859-1 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list 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: 16 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1359238720 news.xs4all.nl 6905 [2001:888:2000:d::a6]:37434 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:37739 On Sun, Jan 27, 2013 at 8:07 AM, Ferrous Cranus wrote: > That code works, but it creates links for both the URL and hits columns! > Only the URL must be linked not the hits column! 1) Trim your quotes. I can't be bothered doing your trimming for you, so I'm now under-quoting. 2) Quit using Google Groups, or manually fix its brain-dead double-spacing. 3) Look into Python's formatting options and see how to solve your own problem. You'll probably want to use .format() rather than %. 4) Look into HTML entity escaping and do not publish anything to the web until you understand why what you had before was dangerous. ChrisA