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


Groups > comp.lang.python > #40558

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

Path csiph.com!usenet.pasdenom.info!gegeweb.org!de-l.enfer-du-nord.net!feeder1.enfer-du-nord.net!newsfeed.eweka.nl!eweka.nl!feeder3.eweka.nl!newsfeed.xs4all.nl!newsfeed3.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Return-Path <davea@davea.name>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.000
X-Spam-Evidence '*H*': 1.00; '*S*': 0.00; 'syntax': 0.03; 'interpreter': 0.04; '"""': 0.05; 'kind,': 0.05; 'append': 0.07; 'escape': 0.07; 'filename': 0.07; 'nested': 0.07; 'subject:file': 0.07; 'python': 0.09; "'''": 0.09; 'integer,': 0.09; 'other,': 0.09; 'sentence': 0.09; 'tuple': 0.09; 'properly': 0.15; "'data'": 0.16; '.py': 0.16; 'clues': 0.16; 'disk.': 0.16; 'etc....': 0.16; 'int.': 0.16; 'means.': 0.16; 'pairs': 0.16; 'worries.': 0.16; 'string': 0.17; 'wrote:': 0.17; 'element': 0.17; 'variable': 0.20; 'help.': 0.22; 'posted': 0.22; 'runs': 0.22; 'sets': 0.23; 'specified': 0.23; "we'd": 0.24; 'linux': 0.24; 'least': 0.25; 'header:In-Reply-To:1': 0.25; 'header:User-Agent:1': 0.26; 'environment': 0.29; 'equivalent,': 0.29; 'str': 0.29; 'subject:end': 0.29; 'subject:some': 0.29; 'probably': 0.29; 'error': 0.30; 'sense': 0.31; 'code': 0.31; 'server.': 0.32; 'file': 0.32; 'running': 0.32; 'print': 0.32; 'like:': 0.33; 'mixed': 0.33; 'quotes': 0.33; 'subject: .': 0.33; 'subject:data': 0.33; 'symbol': 0.33; 'handle': 0.33; 'to:addr:python-list': 0.33; 'program,': 0.34; 'identified': 0.35; 'pm,': 0.35; 'something': 0.35; 'there': 0.35; 'but': 0.36; 'wanted': 0.36; 'should': 0.36; 'subject:: ': 0.38; 'to:addr:python.org': 0.39; 'received:192': 0.39; 'list,': 0.39; 'received:192.168': 0.40; 'subject:-': 0.40; 'your': 0.60; "you've": 0.61; 'different': 0.63; 'received:74.208': 0.71; 'received:74.208.4.194': 0.84; 'fragment': 0.91
Date Tue, 05 Mar 2013 13:18:16 -0500
From Dave Angel <davea@davea.name>
User-Agent Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130106 Thunderbird/17.0.2
MIME-Version 1.0
To python-list@python.org
Subject Re: Inserting-embedding some html data at the end of a .py file
References <7e0a8562-9a48-4f5a-804d-3751733288f0@googlegroups.com> <fea70537-617e-4694-ace0-65568039e574@googlegroups.com> <mailman.2899.1362505528.2939.python-list@python.org> <14d3a13e-9d95-49b5-9d58-205021b79630@googlegroups.com>
In-Reply-To <14d3a13e-9d95-49b5-9d58-205021b79630@googlegroups.com>
Content-Type text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding 8bit
X-Provags-ID V02:K0:n6A1KruI+zkiAzU6tKMTKoHLLzI+lQi7/vKuHEmdeJh uAcaHkISLGAkM9bIzJtCA/YOfURTpFkQ2Y/+a0vYiVpkjKaxlm 5yWdOTpPsewK38l4gBhDJXZM/HubNQlrxxUHjLtYIpCEKLqwhL VyAERWAArfov0MGRFHJKP/l77GU3tDKMSr6f79D7m15wYWf3si TSPaKqrw5ciLmi+nDhiIeA9riphf0hywSy3pjgszKfFx4ZNd3C Gwv/0sgpAf+mkwJ+QC2BRZuTeqwwJ8Xok2P2lRzLSuSN8fe6PR e2Gg20/uS1t4YY2JHExmLYH7JsUB+vkHbr1BX/CYRLudxTPEQ= =
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.2903.1362507510.2939.python-list@python.org> (permalink)
Lines 41
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1362507510 news.xs4all.nl 6842 [2001:888:2000:d::a6]:33643
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:40558

Show key headers only | View raw


On 03/05/2013 12:49 PM, Νίκος Γκρ33κ wrote:
> What extra triple quote?
> There are 2 sets of triple quotes the counter's and the print's !!

There are 3 pairs of triple-quotes.  But one pair is nested inside the 
other, so the interpreter will not handle it the way you apparently 
want.  If you have to use quotes inside quotes, you must either use a 
different kind, or escape them.  Perhaps you wanted something like:

      counter = """
               print '''<center>  etc....
                     <td>font ...
               '''
               """ % data[0]

But this fragment is unreadable to me, so the syntax error is probably 
the least of your worries.

>
> in case htmlpage variable is a .py file i must append a print '''html''' in order for .py code to absorve that code properly no?
>

No clue what that sentence fragment means.

'absorve' isn't an English word, and neither 'absorb' nor 'observe' make 
any sense.

Perhaps if you posted a complete program, and identified it by name, and 
specified the complete environment it runs in, and used English to 
describe what should be appended to what, we'd be able to help.  As it 
is, you've got mixed clues from which that it's both Python 2 and 3, 
running Linux or equivalent, and probably runs on a server.

Using symbol names that make sense would also help.  'htmlpage' is 
apparently a str representing a filename on disk.  'counter' is not an 
integer, but a long string of html.   'data' is apparently a tuple or 
list, and the zeroth element is an int. ??

-- 
-- 
DaveA

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