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


Groups > comp.lang.python > #40552

Re: Inserting-embedding some html data at the end of a .py file

Path csiph.com!usenet.pasdenom.info!goblin2!goblin.stu.neva.ru!newsfeed.xs4all.nl!newsfeed2.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Return-Path <joel.goldstick@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.039
X-Spam-Evidence '*H*': 0.92; '*S*': 0.00; 'else:': 0.03; 'subject:file': 0.07; "'''": 0.09; 'idea?': 0.09; 'cc:addr:python- list': 0.10; 'template': 0.11; '.py': 0.16; 'above?': 0.16; 'did,': 0.16; 'f.read()': 0.16; 'wrote:': 0.17; 'email addr:gmail.com&gt;': 0.20; 'skip:" 30': 0.20; 'skip:= 10': 0.20; 'cc:2**0': 0.23; 'this:': 0.23; 'tried': 0.25; 'cc:addr:python.org': 0.25; 'header:In-Reply-To:1': 0.25; 'skip:" 20': 0.26; 'message-id:@mail.gmail.com': 0.27; 'embed': 0.29; 'subject:end': 0.29; 'subject:some': 0.29; 'url:mailman': 0.29; 'skip:& 10': 0.29; 'skip:& 30': 0.30; 'stuff': 0.30; 'url:python': 0.32; "skip:' 20": 0.32; 'print': 0.32; 'url:listinfo': 0.32; 'skip:h 40': 0.33; 'subject: .': 0.33; 'subject:data': 0.33; 'skip:& 20': 0.33; 'received:google.com': 0.34; 'open': 0.35; 'pm,': 0.35; 'but': 0.36; 'url:org': 0.36; 'correctly': 0.37; 'data': 0.37; 'subject:: ': 0.38; 'some': 0.38; 'subject:-': 0.40; 'end': 0.40; 'url:mail': 0.40; 'remove': 0.61; '8bit%:50': 0.65; '8bit%:100': 0.70; '&lt;/td&gt;': 0.84; '&lt;img': 0.84; '2013': 0.84; '8bit%:65': 0.84; 'url:show': 0.84; '8bit%:56': 0.91; 'joel': 0.91; 'seriously,': 0.91; 'email name:support': 0.96
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:cc:content-type; bh=+hyCsOuNfpT/v2c9PAlfd0RiahUCwWy7QP7nDVwO++k=; b=R32hIw0seUT1F42YofWMYbZQYD1g1tnA7AfvocBO6izmz1x1S/Ny42D7OoI4zLI05k +A7jp/6shlzsfSGdp4CH93AW2GaHBAtC1RtA1pJHKVZ8HMuXReNovbUtPb5aisnFPBVh JGYtbJ6j2+Tm7QG5+HIpn8ZOo1GS1pfxOtVwBcCfK680Tbfr1KzCGQVxXLFHtYbmBMvS XX2pvcUswc2KZYjWlkj3NWq7rNC5BGfUIwhEiTZ0VhIJRkA9C6ZfYkl4HzfEICJXoWtD BqT4a3T/SJzRHz0+RjbgV3NlOGSJYMwsU7FphQEmvQHk1vSwRBu/XgtD2He4JmqAaHvf vhLQ==
MIME-Version 1.0
X-Received by 10.52.19.200 with SMTP id h8mr8582988vde.60.1362505525349; Tue, 05 Mar 2013 09:45:25 -0800 (PST)
In-Reply-To <fea70537-617e-4694-ace0-65568039e574@googlegroups.com>
References <7e0a8562-9a48-4f5a-804d-3751733288f0@googlegroups.com> <fea70537-617e-4694-ace0-65568039e574@googlegroups.com>
Date Tue, 5 Mar 2013 12:45:25 -0500
Subject Re: Inserting-embedding some html data at the end of a .py file
From Joel Goldstick <joel.goldstick@gmail.com>
To Νίκος Γκρ33κ <nikos.gr33k@gmail.com>
Content-Type multipart/alternative; boundary=20cf307ca04cd7de9404d7310991
Cc "python-list@python.org" <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 <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.2899.1362505528.2939.python-list@python.org> (permalink)
Lines 136
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1362505528 news.xs4all.nl 6988 [2001:888:2000:d::a6]:43643
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:40552

Show key headers only | View raw


[Multipart message — attachments visible in raw view] - view raw

On Tue, Mar 5, 2013 at 12:39 PM, Νίκος Γκρ33κ <nikos.gr33k@gmail.com> 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 =       ''' <center><a href="mailto:
> support@superhost.gr"> <img src="/data/images/mail.png"> </a>
>                                                 <center><table border=2
> cellpadding=2 bgcolor=black>
>                                                         <td><font
> color=lime>Αριθμός Επισκεπτών</td>
>                                                         <td><a href="
> http://superhost.gr/?show=stats"><font color=cyan> %d </td>
>                                         ''' % data[0]
>         else:
>                 f = open( "/home/nikos/public_html/cgi-bin/" + htmlpage )
>
>                 htmldata = f.read()
>                 counter =       '''
>                                         print '''<center><a href="mailto:
> support@superhost.gr"> <img src="/data/images/mail.png"> </a>
>                                                 <center><table border=2
> cellpadding=2 bgcolor=black>
>                                                         <td><font
> color=lime>Αριθμός Επισκεπτών</td>
>                                                         <td><a href="
> http://superhost.gr/?show=stats"><font color=cyan> %d </td>
>                                         '''
>

remove the extra triple quote.  But seriously, in 2013 you are writing html
like the above?  That is some awful stuff

>                                         ''' % 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?
> --
> http://mail.python.org/mailman/listinfo/python-list
>



-- 
Joel Goldstick
http://joelgoldstick.com

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


Thread

Inserting-embedding some html data at the end of a .py file Νίκος Γκρ33κ <nikos.gr33k@gmail.com> - 2013-03-05 06:35 -0800
  Re: Inserting-embedding some html data at the end of a .py file Νίκος Γκρ33κ <nikos.gr33k@gmail.com> - 2013-03-05 09:11 -0800
    Re: Inserting-embedding some html data at the end of a .py file Mark Lawrence <breamoreboy@yahoo.co.uk> - 2013-03-05 17:19 +0000
    Re: Inserting-embedding some html data at the end of a .py file Joel Goldstick <joel.goldstick@gmail.com> - 2013-03-05 12:25 -0500
  Re: Inserting-embedding some html data at the end of a .py file Νίκος Γκρ33κ <nikos.gr33k@gmail.com> - 2013-03-05 09:39 -0800
    Re: Inserting-embedding some html data at the end of a .py file Joel Goldstick <joel.goldstick@gmail.com> - 2013-03-05 12:45 -0500
      Re: Inserting-embedding some html data at the end of a .py file Νίκος Γκρ33κ <nikos.gr33k@gmail.com> - 2013-03-05 09:49 -0800
        Re: Inserting-embedding some html data at the end of a .py file Dave Angel <davea@davea.name> - 2013-03-05 13:18 -0500
          Re: Inserting-embedding some html data at the end of a .py file Νίκος Γκρ33κ <nikos.gr33k@gmail.com> - 2013-03-05 10:53 -0800
            Re: Inserting-embedding some html data at the end of a .py file Joel Goldstick <joel.goldstick@gmail.com> - 2013-03-05 14:33 -0500
            Re: Inserting-embedding some html data at the end of a .py file Dave Angel <davea@davea.name> - 2013-03-05 14:48 -0500
          Re: Inserting-embedding some html data at the end of a .py file Νίκος Γκρ33κ <nikos.gr33k@gmail.com> - 2013-03-05 10:53 -0800
      Re: Inserting-embedding some html data at the end of a .py file Νίκος Γκρ33κ <nikos.gr33k@gmail.com> - 2013-03-05 09:49 -0800
    Re: Inserting-embedding some html data at the end of a .py file Mark Lawrence <breamoreboy@yahoo.co.uk> - 2013-03-05 17:53 +0000
    Re: Inserting-embedding some html data at the end of a .py file Roland Koebler <r.koebler@yahoo.de> - 2013-03-06 10:00 +0100
  Re: Inserting-embedding some html data at the end of a .py file Νίκος Γκρ33κ <nikos.gr33k@gmail.com> - 2013-03-05 12:04 -0800
    Re: Inserting-embedding some html data at the end of a .py file Dave Angel <d@davea.name> - 2013-03-05 16:02 -0500
      Re: Inserting-embedding some html data at the end of a .py file Νίκος Γκρ33κ <nikos.gr33k@gmail.com> - 2013-03-05 14:49 -0800
      Re: Inserting-embedding some html data at the end of a .py file Νίκος Γκρ33κ <nikos.gr33k@gmail.com> - 2013-03-05 14:49 -0800
    Re: Inserting-embedding some html data at the end of a .py file "Michael Ross" <gmx@ross.cx> - 2013-03-05 22:29 +0100
  Re: Inserting-embedding some html data at the end of a .py file Νίκος Γκρ33κ <nikos.gr33k@gmail.com> - 2013-03-05 14:47 -0800
    Re: Inserting-embedding some html data at the end of a .py file "Michael Ross" <gmx@ross.cx> - 2013-03-06 00:19 +0100
      Re: Inserting-embedding some html data at the end of a .py file Νίκος Γκρ33κ <nikos.gr33k@gmail.com> - 2013-03-05 15:39 -0800
        Re: Inserting-embedding some html data at the end of a .py file "Michael Ross" <gmx@ross.cx> - 2013-03-06 01:06 +0100
          Re: Inserting-embedding some html data at the end of a .py file Νίκος Γκρ33κ <nikos.gr33k@gmail.com> - 2013-03-05 22:12 -0800
          Re: Inserting-embedding some html data at the end of a .py file Νίκος Γκρ33κ <nikos.gr33k@gmail.com> - 2013-03-05 22:12 -0800
          Re: Inserting-embedding some html data at the end of a .py file Νίκος Γκρ33κ <nikos.gr33k@gmail.com> - 2013-03-05 23:48 -0800
          Re: Inserting-embedding some html data at the end of a .py file Νίκος Γκρ33κ <nikos.gr33k@gmail.com> - 2013-03-05 23:48 -0800
          Re: Inserting-embedding some html data at the end of a .py file Νίκος Γκρ33κ <nikos.gr33k@gmail.com> - 2013-03-06 15:18 -0800
            Re: Inserting-embedding some html data at the end of a .py file "Michael Ross" <gmx@ross.cx> - 2013-03-07 01:25 +0100
              Re: Inserting-embedding some html data at the end of a .py file Νίκος Γκρ33κ <nikos.gr33k@gmail.com> - 2013-03-06 22:35 -0800
                Re: Inserting-embedding some html data at the end of a .py file Roland Koebler <r.koebler@yahoo.de> - 2013-03-07 09:58 +0100
                Re: Inserting-embedding some html data at the end of a .py file Νίκος Γκρ33κ <nikos.gr33k@gmail.com> - 2013-03-07 01:05 -0800
                Re: Inserting-embedding some html data at the end of a .py file Lele Gaifax <lele@metapensiero.it> - 2013-03-07 10:22 +0100
                Re: Inserting-embedding some html data at the end of a .py file Νίκος Γκρ33κ <nikos.gr33k@gmail.com> - 2013-03-07 01:28 -0800
                Re: Inserting-embedding some html data at the end of a .py file Lele Gaifax <lele@metapensiero.it> - 2013-03-07 10:50 +0100
                Re: Inserting-embedding some html data at the end of a .py file Νίκος Γκρ33κ <nikos.gr33k@gmail.com> - 2013-03-07 01:55 -0800
                Re: Inserting-embedding some html data at the end of a .py file Νίκος Γκρ33κ <nikos.gr33k@gmail.com> - 2013-03-07 01:55 -0800
                Re: Inserting-embedding some html data at the end of a .py file Chris Angelico <rosuav@gmail.com> - 2013-03-07 21:19 +1100
                Re: Inserting-embedding some html data at the end of a .py file Νίκος Γκρ33κ <nikos.gr33k@gmail.com> - 2013-03-07 02:34 -0800
                Re: Inserting-embedding some html data at the end of a .py file Νίκος Γκρ33κ <nikos.gr33k@gmail.com> - 2013-03-07 02:34 -0800
                Re: Inserting-embedding some html data at the end of a .py file Νίκος Γκρ33κ <nikos.gr33k@gmail.com> - 2013-03-07 03:51 -0800
                Re: Inserting-embedding some html data at the end of a .py file Νίκος Γκρ33κ <nikos.gr33k@gmail.com> - 2013-03-07 03:51 -0800
                Re: Inserting-embedding some html data at the end of a .py file Νίκος Γκρ33κ <nikos.gr33k@gmail.com> - 2013-03-07 01:28 -0800
                Re: Inserting-embedding some html data at the end of a .py file Νίκος Γκρ33κ <nikos.gr33k@gmail.com> - 2013-03-07 02:09 -0800
                Re: Inserting-embedding some html data at the end of a .py file Joel Goldstick <joel.goldstick@gmail.com> - 2013-03-07 05:28 -0500
                Re: Inserting-embedding some html data at the end of a .py file Νίκος Γκρ33κ <nikos.gr33k@gmail.com> - 2013-03-07 04:06 -0800
                Re: Inserting-embedding some html data at the end of a .py file Chris Angelico <rosuav@gmail.com> - 2013-03-07 23:17 +1100
                Re: Inserting-embedding some html data at the end of a .py file Νίκος Γκρ33κ <nikos.gr33k@gmail.com> - 2013-03-07 04:06 -0800
                Re: Inserting-embedding some html data at the end of a .py file Νίκος Γκρ33κ <nikos.gr33k@gmail.com> - 2013-03-07 02:09 -0800
                Re: Inserting-embedding some html data at the end of a .py file Νίκος Γκρ33κ <nikos.gr33k@gmail.com> - 2013-03-07 01:05 -0800
              Re: Inserting-embedding some html data at the end of a .py file Νίκος Γκρ33κ <nikos.gr33k@gmail.com> - 2013-03-06 22:35 -0800
              Re: Inserting-embedding some html data at the end of a .py file Νίκος Γκρ33κ <nikos.gr33k@gmail.com> - 2013-03-06 22:42 -0800
              Re: Inserting-embedding some html data at the end of a .py file Νίκος Γκρ33κ <nikos.gr33k@gmail.com> - 2013-03-06 22:42 -0800
          Re: Inserting-embedding some html data at the end of a .py file Νίκος Γκρ33κ <nikos.gr33k@gmail.com> - 2013-03-06 15:18 -0800
      Re: Inserting-embedding some html data at the end of a .py file Νίκος Γκρ33κ <nikos.gr33k@gmail.com> - 2013-03-05 15:39 -0800

csiph-web