Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!us.feeder.erje.net!news2.arglkargh.de!news.albasani.net!newsfeed.freenet.ag!news2.euro.net!newsgate.cistron.nl!newsgate.news.xs4all.nl!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.031 X-Spam-Evidence: '*H*': 0.94; '*S*': 0.00; '"%s"': 0.09; 'formatted': 0.09; 'tuple': 0.09; 'typed': 0.09; 'suggest': 0.11; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'item)': 0.16; 'subject:Formatting': 0.16; 'wrote:': 0.17; 'jan': 0.18; 'please?': 0.22; 'header:In-Reply-To:1': 0.25; 'am,': 0.27; 'important.': 0.27; 'strongly': 0.27; 'message- id:@mail.gmail.com': 0.27; 'concern': 0.29; 'link,': 0.29; 'that.': 0.30; 'code': 0.31; 'print': 0.32; 'to:addr:python-list': 0.33; 'received:google.com': 0.34; 'text': 0.34; 'needed': 0.35; 'received:209.85': 0.35; 'but': 0.36; 'possible': 0.37; 'two': 0.37; 'item': 0.37; 'received:209': 0.37; 'subject:: ': 0.38; 'to:addr:python.org': 0.39; 'more': 0.63; 'to,': 0.65; 'fact,': 0.69; 'click': 0.76; 'yourself': 0.77; '2013': 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=QH5ThgvXrzQD+oT4qBR+Qz+iFfANpPj68mRV5ufKS3w=; b=wH0s/rHKEaXDoSW+eoN+GygI8m5zDeBx8tFGsQvPFa0PRUsaHJyOpm8SPC+EGK2bd4 BzLRktjcxGzdmvmzxazG04R+fVURn7otK5Vi3/t128BoeSu49RlZOJ959jr5OvcqLiQN CqU14wifHQvGQjLC6aMiML93H974aQOqbJ27UQOElYk1D05OFJw2lrXcApnMcTPfIXxp ksDNIKD1GyOveIYpD1jllEPGsz6AUwECJbqJ5UDGTmK8iG5qnQEkH23vvw+efkzDKsNb eHg9U7JCZJmCqaQigT2L/Y34NIUMP55Fxf8YikDvVwlXJmzIdXcInLJVslfRg7C8WDtr x9cA== MIME-Version: 1.0 X-Received: by 10.52.22.194 with SMTP id g2mr4298123vdf.91.1359223452830; Sat, 26 Jan 2013 10:04:12 -0800 (PST) In-Reply-To: <6ad78df4-0ec0-4760-8f5a-5ecf129c5e65@googlegroups.com> References: <6ad78df4-0ec0-4760-8f5a-5ecf129c5e65@googlegroups.com> Date: Sun, 27 Jan 2013 05:04:12 +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: 17 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1359223462 news.xs4all.nl 6895 [2001:888:2000:d::a6]:56076 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:37729 On Sun, Jan 27, 2013 at 4:51 AM, Ferrous Cranus wrote: > print ( " %s " % item ) > > In the aboce code wheb 'URL' is to be typed out be print i need it to be formatted as a link, so the viewer can click on it. > > Is this possible please? Easy, just make a tuple of item,item and have two %s markers: print( "%s" % (item, item) ) But you need to concern yourself with escaping. In fact, you already needed to, just to produce it as text - but it's now even more important. I strongly suggest you look into that. ChrisA