Path: csiph.com!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!newsfeed.xs4all.nl!newsfeed1.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.020 X-Spam-Evidence: '*H*': 0.96; '*S*': 0.00; 'escape': 0.07; '"%s"': 0.09; 'formatted': 0.09; 'to:addr:comp.lang.python': 0.09; 'tuple': 0.09; 'tuple.': 0.09; 'typed': 0.09; 'cc:addr:python- list': 0.10; 'suggest': 0.11; 'item)': 0.16; 'subject:Formatting': 0.16; 'wrote:': 0.17; 'jan': 0.18; 'please?': 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; 'am,': 0.27; 'important.': 0.27; 'strongly': 0.27; 'lines': 0.28; 'chris': 0.28; 'concern': 0.29; 'didnt': 0.29; 'link,': 0.29; 'quoting': 0.29; 'that.': 0.30; 'code': 0.31; 'suggestion': 0.32; 'print': 0.32; 'received:google.com': 0.34; 'text': 0.34; 'needed': 0.35; 'received:209.85.220': 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; 'more': 0.63; 'dont': 0.64; 'to,': 0.65; 'fact,': 0.69; '8bit%:100': 0.70; '8bit%:92': 0.70; 'special': 0.73; 'click': 0.76; 'yourself': 0.77; '2013': 0.84; 'subject:value': 0.84; 'understood.': 0.84 X-Received: by 10.49.116.139 with SMTP id jw11mr1926453qeb.12.1359229301073; Sat, 26 Jan 2013 11:41:41 -0800 (PST) Newsgroups: comp.lang.python Date: Sat, 26 Jan 2013 11:41:40 -0800 (PST) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=94.68.70.179; posting-account=DYJQ-woAAACEPH85Au2BhUVfFTfSfVa4 References: <6ad78df4-0ec0-4760-8f5a-5ecf129c5e65@googlegroups.com> User-Agent: G2/1.0 X-Google-Web-Client: true X-Google-IP: 94.68.70.179 MIME-Version: 1.0 Subject: Re: Formatting a column's value output From: Ferrous Cranus To: comp.lang.python@googlegroups.com Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: python-list@python.org 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: , Message-ID: Lines: 45 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1359229864 news.xs4all.nl 6864 [2001:888:2000:d::a6]:44827 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:37733 =CE=A4=CE=B7 =CE=A3=CE=AC=CE=B2=CE=B2=CE=B1=CF=84=CE=BF, 26 =CE=99=CE=B1=CE= =BD=CE=BF=CF=85=CE=B1=CF=81=CE=AF=CE=BF=CF=85 2013 8:04:12 =CE=BC.=CE=BC. U= TC+2, =CE=BF =CF=87=CF=81=CE=AE=CF=83=CF=84=CE=B7=CF=82 Chris Angelico =CE= =AD=CE=B3=CF=81=CE=B1=CF=88=CE=B5: > On Sun, Jan 27, 2013 at 4:51 AM, Ferrous Cranus w= rote: >=20 > > print ( " %= s " % item ) >=20 >=20 >=20 > > >=20 > > In the aboce code wheb 'URL' is to be typed out be print i need it to b= e formatted as a link, so the viewer can click on it. >=20 > > >=20 > > Is this possible please? >=20 >=20 >=20 > Easy, just make a tuple of item,item and have two %s markers: >=20 >=20 >=20 > print( "%s" % (item, = item) ) >=20 >=20 >=20 > But you need to concern yourself with escaping. In fact, you already >=20 > needed to, just to produce it as text - but it's now even more >=20 > important. I strongly suggest you look into that. =20 I can use triple (''') quoting so i dont have to escape special characters. But i didnt understand you suggestion about the tuple. The dataset returns many lines and i need to transfor only the URL column..= .. Sorry i did not understood.