Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder1.news.weretis.net!feeder.erje.net!eu.feeder.erje.net!eweka.nl!lightspeed.eweka.nl!194.109.133.87.MISMATCH!newsfeed.xs4all.nl!newsfeed1.news.xs4all.nl!xs4all!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.001 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'else:': 0.03; 'subject:file': 0.07; "'''": 0.09; 'idea?': 0.09; 'lawrence': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'template': 0.11; 'charset:iso-8859-7': 0.15; '.py': 0.16; 'did,': 0.16; 'f.read()': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'wrote:': 0.17; 'skip:" 30': 0.20; 'skip:= 10': 0.20; 'this:': 0.23; 'tried': 0.25; 'header:In- Reply-To:1': 0.25; 'header:User-Agent:1': 0.26; 'skip:" 20': 0.26; 'header:X-Complaints-To:1': 0.28; 'embed': 0.29; 'subject:end': 0.29; 'subject:some': 0.29; 'from:addr:yahoo.co.uk': 0.32; 'print': 0.32; 'subject: .': 0.33; 'subject:data': 0.33; 'to:addr :python-list': 0.33; 'open': 0.35; 'doing': 0.35; 'something': 0.35; 'received:org': 0.36; 'but': 0.36; 'correctly': 0.37; 'data': 0.37; 'subject:: ': 0.38; 'mark': 0.38; 'to:addr:python.org': 0.39; 'subject:-': 0.40; 'header:Received:5': 0.40; 'end': 0.40; 'url:show': 0.84; '\xc1\xf1\xe9\xe8\xec\xfc\xf2': 0.84 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Mark Lawrence Subject: Re: Inserting-embedding some html data at the end of a .py file Date: Tue, 05 Mar 2013 17:53:10 +0000 References: <7e0a8562-9a48-4f5a-804d-3751733288f0@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-7; format=flowed Content-Transfer-Encoding: 8bit X-Gmane-NNTP-Posting-Host: host-92-18-29-221.as13285.net User-Agent: Mozilla/5.0 (Windows NT 6.0; rv:17.0) Gecko/20130215 Thunderbird/17.0.3 In-Reply-To: X-Antivirus: avast! (VPS 130305-0, 05/03/2013), Outbound message X-Antivirus-Status: Clean 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: 41 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1362505968 news.xs4all.nl 6912 [2001:888:2000:d::a6]:49995 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:40555 On 05/03/2013 17:39, Νίκος Γκρ33κ wrote: > But i did, I just tried this: > > # open html template > if htmlpage.endswith('.html'): > f = open( "/home/nikos/public_html/" + htmlpage ) > > htmldata = f.read() > counter = '''
>
> > > ''' % data[0] > else: > f = open( "/home/nikos/public_html/cgi-bin/" + htmlpage ) > > htmldata = f.read() > counter = ''' > print '''
>
Αριθμός Επισκεπτών %d
> > > ''' > ''' % data[0] > > template = htmldata + counter > print ( template ) > ============= > > But still doens't embed correctly the additional html data at the end of the .py files..... > > Do you have an idea? > You're doing something wrong. -- Cheers. Mark Lawrence
Αριθμός Επισκεπτών %d