Announcing Clabate 0.5.0: minimalistic class-based templates for Python

2022-12-09 Thread Axy via Python-list
Hi there, although it's quite old my side project, it has reached the point where I don't want to add anything more. It's a simple template system based on standard string formatting. You declare your template strings as class attributes and they are formatted in the right order. For dynamic

Clabate: minimalistic class-based templates for Python

2022-08-02 Thread Axy via Python-list
Hi all, this is a test message after tweaking my self-hosted mail server and the subject is just in case if you receive it https://declassed.art/en/blog/2022/06/29/clabate-class-based-templates Previously I tried to reply to someone here but the message was rejected. Did not post to mail

Proper way to download stylesheets and templates

2018-06-26 Thread T Berger
From: T Berger IΓ ╓m creating a webapp and trying to download a stylesheet and templates from my manualΓ ╓s support site. I must be doing something wrong, because when I try to run my app, I get a 404 error message. I downloaded the files by dragging them off the screen into my webapp folder

Re: Proper way to download stylesheets and templates

2018-06-25 Thread T Berger
On Monday, June 25, 2018 at 12:12:26 PM UTC-4, T Berger wrote: > I’m creating a webapp and trying to download a stylesheet and templates from > my manual’s support site. I must be doing something wrong, because when I try > to run my app, I get a 404 error message. I downloaded the

Proper way to download stylesheets and templates

2018-06-25 Thread T Berger
I’m creating a webapp and trying to download a stylesheet and templates from my manual’s support site. I must be doing something wrong, because when I try to run my app, I get a 404 error message. I downloaded the files by dragging them off the screen into my webapp folder. But I’m getting a

Re: Manager for project templates, that allows "incremental" feature addition

2017-06-02 Thread Lele Gaifax
Lele Gaifax writes: > Paul Moore writes: > >> On Thursday, 23 March 2017 15:56:43 UTC, Paul Moore wrote: >> >> Sadly, it doesn't support Windows, which is what I use. > > FYI, I just saw https://pypi.python.org/pypi/what/0.4.0, that seems an > alternative port of Inquirer.js. Unfortunatel

Re: Manager for project templates, that allows "incremental" feature addition

2017-03-24 Thread Lele Gaifax
Paul Moore writes: > On Thursday, 23 March 2017 15:56:43 UTC, Paul Moore wrote: > > Sadly, it doesn't support Windows, which is what I use. FYI, I just saw https://pypi.python.org/pypi/what/0.4.0, that seems an alternative port of Inquirer.js. Unfortunately it's Py2 only :-\ If you can t

Re: Manager for project templates, that allows "incremental" feature addition

2017-03-23 Thread Lele Gaifax
Paul Moore writes: > Sadly, it doesn't support Windows, which is what I use. I'm sorry, there is little I can do on that front, but if you come up with an alternative library, please let me know. ciao, lele. -- nickname: Lele Gaifax | Quando vivrò di quello che ho pensato ieri real: Emanuele

Re: Manager for project templates, that allows "incremental" feature addition

2017-03-23 Thread Paul Moore
On Thursday, 23 March 2017 15:56:43 UTC, Paul Moore wrote: > On Wednesday, 22 March 2017 09:41:21 UTC, Lele Gaifax wrote: > > This what I wrote and heavily use > > > > https://pypi.python.org/pypi/metapensiero.tool.tinject > > > > It seems to fit some, but not all, of your requested features

Re: Manager for project templates, that allows "incremental" feature addition

2017-03-23 Thread Paul Moore
On Wednesday, 22 March 2017 09:41:21 UTC, Lele Gaifax wrote: > This what I wrote and heavily use > > https://pypi.python.org/pypi/metapensiero.tool.tinject > > It seems to fit some, but not all, of your requested features. Thanks - it looks like it could be very useful. I'll certainly give it

Re: Manager for project templates, that allows "incremental" feature addition

2017-03-22 Thread Lele Gaifax
Paul Moore writes: > I'm looking for a utility that is something like cookiecutter, in that it > generates a "template" project for me. However, I would like the ability to > have a template add content based on runtime questions, something like > >Do you want to include a C extension? [ye

Manager for project templates, that allows "incremental" feature addition

2017-03-21 Thread Paul Moore
I'm looking for a utility that is something like cookiecutter, in that it generates a "template" project for me. However, I would like the ability to have a template add content based on runtime questions, something like Do you want to include a C extension? [yes/no] ... adds Extension() t

Just added AnyChart JS Charts integration templates for easier dataviz with Python (+ Flask/Django) and MySQL

2016-12-29 Thread andrey . khachaturov
Hi all, We at AnyChart JS Charts http://www.anychart.com have just released a series of 20+ integration templates to help web developers add interactive charts, maps, stock and financial graphs, Gantt charts, and dashboards to web apps much easier, no matter what your stack is. In particular

Python {executable templates from XSLT, code generation tool}

2014-12-15 Thread Jean-Baptiste Braun
Hi, I'm searching a tool to translate an xsl file to executable python code. I know how to execute xslt with python. What I want is to process my xslt rules *in* python. Example : Mr Mrs I would like it to be translated in a python test statement. Does anyone know something like this ? Or

Re: Idea for pure-python templates using AST.

2011-08-16 Thread Paul Wray
> You code fail, see below for other comment > > Traceback (most recent call last): >   File "Download/pastie-2379978.rb", line 108, in >     make_template(template1) >   File "Download/pastie-2379978.rb", line 60, in make_template >     ast.fix_missing_locations(astFromSrc) >   File "/usr/lib/pyt

Re: Idea for pure-python templates using AST.

2011-08-16 Thread Paul Wray
On Aug 17, 5:23 am, Irmen de Jong wrote: > On 16-08-11 13:33, Paul Wray wrote: > > > > > > > > > > > The idea: > > Python syntax allows a statement to be a bare literal or identifier. > > These have no effect on the program. > > > So the function below is legal python: > > > def myFunc(): > > 'a'

Re: Idea for pure-python templates using AST.

2011-08-16 Thread Tim Roberts
"Paul Wray" wrote: > >Ive had what I think is a great idea for pure-python templates (I can almost >hear the groans, bear with me...) >... >The idea: >Python syntax allows a statement to be a bare literal or identifier. These >have no effect on the progra

Re: Idea for pure-python templates using AST.

2011-08-16 Thread Chris Angelico
On Wed, Aug 17, 2011 at 12:57 AM, Paul Wray wrote: > Thanks yes ama aware of docstrings but did not consider. > They are easy to strip out though. > Maybe. You'd have to take notice of what's a docstring and what's the first element to be outputted. Or alternatively, just forbid docstrings on tho

Re: Idea for pure-python templates using AST.

2011-08-16 Thread Paul Wray
On Aug 17, 2:14 am, Chris Angelico wrote: > On Tue, Aug 16, 2011 at 12:33 PM, Paul Wray wrote: > > The idea is simply to use python ASTs to transform this code so that it > > accumulates the values of the bare expressions. > > That'd be similar to what the interactive loop does. Are you aware, >

Re: Idea for pure-python templates using AST.

2011-08-16 Thread Irmen de Jong
On 16-08-11 13:33, Paul Wray wrote: The idea: Python syntax allows a statement to be a bare literal or identifier. These have no effect on the program. So the function below is legal python: def myFunc(): 'a' x = 45 'b'; 'c'; x So is this (within the appropriate class context of course): def

Re: Idea for pure-python templates using AST.

2011-08-16 Thread Chris Angelico
On Tue, Aug 16, 2011 at 12:33 PM, Paul Wray wrote: > The idea is simply to use python ASTs to transform this code so that it > accumulates the values of the bare expressions. That'd be similar to what the interactive loop does. Are you aware, though, that docstrings are bare expressions? You may

Re: Idea for pure-python templates using AST.

2011-08-16 Thread anand jeyahar
: > On Aug 16, 1:33 pm, "Paul Wray" wrote: >> Hello all >> >> Ive had what I think is a great idea for pure-python templates (I can almost >> hear the groans, bear with me...) >> >> For the impatient, proof of concept is athttp://pastie.org/23799

Re: Idea for pure-python templates using AST.

2011-08-16 Thread Terry Reedy
On 8/16/2011 7:33 AM, Paul Wray wrote: Hello all Ive had what I think is a great idea for pure-python templates (I can almost hear the groans, bear with me...) For the impatient, proof of concept is at http://pastie.org/2379978 demonstrating simple substitution, balanced tags using context

Re: Idea for pure-python templates using AST.

2011-08-16 Thread aspineux
On Aug 16, 1:33 pm, "Paul Wray" wrote: > Hello all > > Ive had what I think is a great idea for pure-python templates (I can almost > hear the groans, bear with me...) > > For the impatient, proof of concept is athttp://pastie.org/2379978 > demonstrating simple su

Idea for pure-python templates using AST.

2011-08-16 Thread Paul Wray
Hello all Ive had what I think is a great idea for pure-python templates (I can almost hear the groans, bear with me...) For the impatient, proof of concept is at http://pastie.org/2379978 demonstrating simple substitution, balanced tags using context manager, subtemplates, and template

Re: lightweight way to create new projects from templates

2011-05-12 Thread Jonathan Hartley
Hey Chris, Thanks for the thoughts. I must confess I had already given up on a 'single file' approach, because I want to make it easy for people to create their own templates, so I have to handle copying a template defined by creating a new directory full of diles. If I'm alread

Re: lightweight way to create new projects from templates

2011-05-11 Thread Chris Angelico
cause of all the functionality it > includes. I'm not even sure whether 'creating new projects from templates' > is the central goal of Paste, or just an incidental benefit that it provides > while performing some other task. > > As a lightweight alternative, I'm cr

lightweight way to create new projects from templates

2011-05-11 Thread Jonathan Hartley
eating new projects from templates' is the central goal of Paste, or just an incidental benefit that it provides while performing some other task. As a lightweight alternative, I'm creating a project called 'Genesis'. Functionally, it will be little more than a 'cp -r'

Re: Python escape usage in django templates by GAE

2011-03-03 Thread Niklas RTZ
%s' % >> ('login',_("Log in")) >> >> And the output is strange. View source show this: >> >> Add03 Mar >> >> Log in<a href="google.com">Google</a> <a >> href="google.com">Yahoo</a> <

Re: Python escape usage in django templates by GAE

2011-03-03 Thread Chris Rebert
t; href="google.com">Yahoo</a> <a > href="google.com">MySpace</a> <a > href="google.com">AOL</a> <a > href="login">Log in</a> > > > > Can you make ad advice how to proceed? Many thanks, IIRC

Python escape usage in django templates by GAE

2011-03-02 Thread Niklasro
Hi I got problems with escape displaying like junk when upgrading from django 0.96 to 1.2 with google app engine. The code is # let user choose authenticator for p in openIdProviders: p_name = p.split('.')[0] # take "AOL" from "AOL.com" p_url = p.lower()

Re: Question on templates and python logging

2010-04-03 Thread Gabriel Genellina
En Sat, 03 Apr 2010 20:42:20 -0300, David LePage escribió: The problem that i'm trying to solve is taking data collected along the way and outputting this into these HTML pages. [...] I was hoping I could tie the logging classes into something like this, where I was leveraging an HTML tem

Question on templates and python logging

2010-04-03 Thread David LePage
Hi - I have been struggling with this problem for quite some time and was hoping somebody could give me some pointers. I have a wxPython front end wizard that collects some information and outputs some HTML pages (not hosted by a web server, but viewable locally on the machine running the appli

problems with Cheetah base class being in templates directory

2009-05-28 Thread mobiledreamers
*How do we setup Cheetah so it runs with all templates in the templates directory and all code in the .. directory code.py* production=True if not production: try:web.render('mafbase.tmpl', None, True, 'mafbase') except:pass else: from templates import mafbase te

Free Web Design Templates

2008-08-12 Thread raja
Start B2B storefronts on Alibaba, Show products to all buyers - Free! http://finance4u.synthasite.com/ -- http://mail.python.org/mailman/listinfo/python-list

Re: How do web templates separate content and logic?

2008-07-03 Thread Mike
> show off what a template language buys you. > Yes, I really meant the opposite - _typically_ a web template consits of more than just HTML. Exception - helloworld-like examples. > > Real application templates quickly became complicated and > > require full blown s

Re: How do web templates separate content and logic?

2008-07-02 Thread George Sakkis
pure men log file > browser ;). That's the opposite of what I said. For helloworld-like examples, a web template is an overkill. It's non-trivial applications that can show off what a template language buys you. > Real application templates quickly became complicated and > requ

Re: How do web templates separate content and logic?

2008-07-02 Thread Bruno Desthuilliers
TheDarkTrumpet a écrit : Another thing I'd like to add on this subject. I agree with others here that having logic in the view isn't really a bad thing. I used to think it did, but now I don't think it does as much. I feel that when you're separating out the view, you're giving really non-prog

Re: How do web templates separate content and logic?

2008-07-02 Thread TheDarkTrumpet
Another thing I'd like to add on this subject. I agree with others here that having logic in the view isn't really a bad thing. I used to think it did, but now I don't think it does as much. I feel that when you're separating out the view, you're giving really non-programmers the ability to actu

Re: How do web templates separate content and logic?

2008-07-01 Thread Kirk Strauser
At 2008-06-30T19:34:53Z, Mike <[EMAIL PROTECTED]> writes: > I should have say "why embedding HTML into Python is not good enough?" ;=) I'm a programmer and would be able to cope with embedding HTML in assembler if the need arose. Having said that, embedding HTML in anything but HTML tends to be

Re: How do web templates separate content and logic?

2008-06-30 Thread [EMAIL PROTECTED]
On 30 juin, 21:34, Mike <[EMAIL PROTECTED]> wrote: > On Jun 30, 1:49 pm, "[EMAIL PROTECTED]" > > <[EMAIL PROTECTED]> wrote: > > > > Then what is so *good* about it, why embedding HTML into Python is not > > > good? > > > Who said embedding HTML in Python was bad ? Did you _carefully_ read > > John'

Re: How do web templates separate content and logic?

2008-06-30 Thread Mike
On Jun 30, 1:49 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > > > Then what is so *good* about it, why embedding HTML into Python is not > > good? > > Who said embedding HTML in Python was bad ? Did you _carefully_ read > John's question ?-) > I should have say "why embedding HTML into Pyth

Re: How do web templates separate content and logic?

2008-06-30 Thread Mike
iew a log file in the browser, a separate template is probably an The keyword here is "(ideally)". These _typical_ cases are pretty much restricted to a helloworld-like examples or to a pure men log file browser ;). Real application templates quickly became complicated and require full blown sc

Re: How do web templates separate content and logic?

2008-06-30 Thread [EMAIL PROTECTED]
On Jun 27, 9:09 am, "John Salerno" <[EMAIL PROTECTED]> wrote: > Of course, I suppose whether or not any of this matters depends on if you > are a web designer or a programmer, but am I missing something about > templates, or is it really the case that they, more or less

Re: How do web templates separate content and logic?

2008-06-30 Thread [EMAIL PROTECTED]
On 30 juin, 19:19, Mike <[EMAIL PROTECTED]> wrote: > On Jun 30, 10:57 am, Bruno Desthuilliers > [EMAIL PROTECTED]> wrote: > > > Some (if not most) templating systems use their own mini-language to > > handle presentation logic. > > IMHO this is the funniest (worst) part of all this 'templating' >

Re: How do web templates separate content and logic?

2008-06-30 Thread George Sakkis
(worst) part of all this 'templating' > buss :) > It reminds me the good old slogan: "Have you invented your own GUI > library yet?" > > > > > The meme "thou shall not mix domain logic with presentation" is very > > often misunderstood as &

Re: How do web templates separate content and logic?

2008-06-30 Thread Mike
e you invented your own GUI library yet?" > > The meme "thou shall not mix domain logic with presentation" is very > often misunderstood as "you must not have anything else than html in > templates", which is just plain non-sense. Even declarative templating > sy

Re: How do web templates separate content and logic?

2008-06-30 Thread Bruno Desthuilliers
roducing more "content" to display. Indeed. So maybe my question was a little premature. The meme "thou shall not mix domain logic with presentation" is very often misunderstood as "you must not have anything else than html in templates", which is just plain non-sen

Re: How do web templates separate content and logic?

2008-06-30 Thread has
On 29 Jun, 04:18, John Salerno <[EMAIL PROTECTED]> wrote: > No, I don't mean presentation logic at all. I mean something along the > lines of combining HTML (which is what I refer to as "content") and > Python (which is what I meant by "logic"). [Note: if you're not familiar with MVC, best go rea

Re: How do web templates separate content and logic?

2008-06-29 Thread Guillaume Bog
On Mon, Jun 30, 2008 at 11:27 AM, Tim Roberts <[EMAIL PROTECTED]> wrote: > John Salerno <[EMAIL PROTECTED]> wrote: > > > > > If it seems out of place to you, then you shouldn't do it. In general, you > need to find a model that makes sense to you, and that allows you to write > readable, workable

Re: How do web templates separate content and logic?

2008-06-29 Thread Tim Roberts
John Salerno <[EMAIL PROTECTED]> wrote: > >No, I don't mean presentation logic at all. I mean something along the >lines of combining HTML (which is what I refer to as "content") and >Python (which is what I meant by "logic"). So for example, if you have >code like this (and this isn't necessari

Re: How do web templates separate content and logic?

2008-06-28 Thread John Salerno
[EMAIL PROTECTED] wrote: For which definitions of "content" and "logic" ??? The point of mvc is to keep domain logic separated from presentation logic, not to remove logic from presentation (which just couldn't work). Templating systems are for presentation logic. Whether they work by embedding

Re: How do web templates separate content and logic?

2008-06-27 Thread [EMAIL PROTECTED]
On 27 juin, 18:09, "John Salerno" <[EMAIL PROTECTED]> wrote: > I've been doing some research on web templates, and even though I read that > they help enforce the MVC pattern, I don't really understand how they are > keeping content and logic separated. For

Re: How do web templates separate content and logic?

2008-06-27 Thread Sebastian "lunar" Wiesner
John Salerno <[EMAIL PROTECTED]>: > But when you have a templating system that mixes HTML and Python code, how > is this helping to keep things separate? You don't. Normally you embed only the code, that is absolutely necessary, e.g. for iterating over a list. Consider an online shop, that nee

How do web templates separate content and logic?

2008-06-27 Thread John Salerno
I've been doing some research on web templates, and even though I read that they help enforce the MVC pattern, I don't really understand how they are keeping content and logic separated. Layout is easy, it's just not there as far as I can see, and CSS can be used for that. But

Re: string templates

2007-04-04 Thread Facundo Batista
David Bear wrote: > I was justing wondering how safe python string templates are to use with > unicode. I was just scanning pep 292 and it seems to say that they are -- > or can by with inheritance... but I don't quite understand. What do you mean with "safe"? I use stri

string templates

2007-04-04 Thread David Bear
I was justing wondering how safe python string templates are to use with unicode. I was just scanning pep 292 and it seems to say that they are -- or can by with inheritance... but I don't quite understand. -- David Bear -- let me buy your intellectual property, I want to own your tho

Templates for epydoc

2007-02-13 Thread [EMAIL PROTECTED]
Hello, I am looking for a good css template to be used with epydoc . Google did not help. Any links would be helpful. - Suresh -- http://mail.python.org/mailman/listinfo/python-list

Re: PyMeld for html templates?

2007-01-22 Thread Richie Hindle
[Sean] > The pymeld docs show examples only for the Python command line > interpreter and show using the print statement to output stuff. But > using mod_python.apache, I think you need to use req.write(something) > format. And of course, this fails when you feed it output from Meld. req.write(str

Re: PyMeld for html templates?

2007-01-21 Thread Sean Schertell
I'm trying to get PyMeld happening but I'm a bit stumped as to how to make it work with mod_python. The pymeld docs show examples only for the Python command line interpreter and show using the print statement to output stuff. But using mod_python.apache, I think you need to use req.write(so

Re: PyMeld for html templates?

2007-01-21 Thread Sean Schertell
Thanks Richie! That's exactly the reply I was hoping for. Hooray! Sean On Jan 20, 2007, at 9:50 PM, Richie Hindle wrote: > Hi Sean, > >> Thanks Richie -- but actually, what I had in mind was slightly >> different. I want for my CONTENT pages to only contain the content. >> So to modify your e

Re: PyMeld for html templates?

2007-01-19 Thread Richie Hindle
[Sean] > I wonder if anyone has any thoughts on PyMeld as a template > system for churning out general websites? I'm doing that (but then I would be wouldn't I? 8-) http://www.mandant.net is an example - the content of each page comes from a file containing just the content, the layout and sidebar

Re: PyMeld for html templates?

2007-01-19 Thread metaperl
Sean Schertell wrote: > > Of course I'm going to try them all but I wonder if anyone has any > thoughts on PyMeld as a template system for churning out general > websites? > meld3 evolved from pymeld. I use meld3 - http://plope.com/software/meld3/ this whole style of templating is known as push

Re: PyMeld for html templates?

2007-01-18 Thread Bruno Desthuilliers
Sean Schertell a écrit : > I'm trying to decide which template system to get married to. I think > I've narrowed it down to PyMeld, Cheetah, or Jinja but leaning heavily > toward PyMeld because I love the idea that your templates are *totally* > clean and that get m

PyMeld for html templates?

2007-01-17 Thread Sean Schertell
I'm trying to decide which template system to get married to. I think I've narrowed it down to PyMeld, Cheetah, or Jinja but leaning heavily toward PyMeld because I love the idea that your templates are *totally* clean and that get manipulated from behind the scenes. This s

recover/extract content from html with help of cheetah templates

2006-12-01 Thread [EMAIL PROTECTED]
Hello, currently i am developing a very small cms using python and cheetah. very early i have noticed that i was lacking the method to extract/recover the contents (html,text) from the html that is generated by cheetah and delivered to the site viewer. to explain it further: during the output pro

Re: HTML Templates (Sitemesh/Tiles concept) in Python

2006-10-24 Thread metaperl
Suren wrote: > It seems error prone as well as bad design to scatter this logic in > each content page. Is there a template logic like Sitemesh or Tiles > concept that can decorate a desired page just before show time? > Suren, you are looking for push-style templating. I list a number of alter

Re: HTML Templates (Sitemesh/Tiles concept) in Python

2006-10-23 Thread grahamd
Suren wrote: > > Python with ? CGI ? FastCGI ? mod_python ? Other ? > > We are using mod_python and SSI. We are inheriting some legacy code > that we do not want to mess with at all. If you are already using SSI for basic page composition using 'include virtual', it may be of interest for you to k

Re: HTML Templates (Sitemesh/Tiles concept) in Python

2006-10-23 Thread bruno de chez modulix en face
Suren a écrit : > > Python with ? CGI ? FastCGI ? mod_python ? Other ? > > We are using mod_python and SSI. > > We are inheriting some legacy code > that we do not want to mess with at all. Ok. > > You shouldn't - unless this is an internal web-based application, not a > > public site. Since yo

Re: HTML Templates (Sitemesh/Tiles concept) in Python

2006-10-23 Thread Suren
> Python with ? CGI ? FastCGI ? mod_python ? Other ? We are using mod_python and SSI. We are inheriting some legacy code that we do not want to mess with at all. > You shouldn't - unless this is an internal web-based application, not a > public site. Since your dynamically generating the pages,

Re: HTML Templates (Sitemesh/Tiles concept) in Python

2006-10-23 Thread Bruno Desthuilliers
Suren wrote: > Hello, > > I am a newbie to python and web development. I am part of a fairly > simple project and we are trying to identify an efficient way to design > our html pages. The technologies at our disposal are javascript, html > and python for now. Python with ? CGI ? FastCGI ? mod_py

HTML Templates (Sitemesh/Tiles concept) in Python

2006-10-23 Thread Suren
Hello, I am a newbie to python and web development. I am part of a fairly simple project and we are trying to identify an efficient way to design our html pages. The technologies at our disposal are javascript, html and python for now. Our pages bear a very standard look. Here is what it looks li

Re: templates

2006-01-31 Thread thakadu
I haven't got around to trying HTMLTemplate yet but it is on my list of things to do. It would be great to see how it compares in perfomance and simplicity to PyMeld and other DOM approaches. -- http://mail.python.org/mailman/listinfo/python-list

Re: templates

2006-01-31 Thread thakadu
Yes I looked at that but I did not benchmark it. Basically it seems to convert the Meld or part of a Meld into a %s template in any case and I already knew that %s performace was very good. So if I had used PyMeld combined with %s then sure it would be much faster but I wanted to benchmark a pure P

Re: templates

2006-01-31 Thread has
thakadu wrote: > I did not try PyMeldLite because the HTML I am using is exactlty that: > HTML and not XHTML. FWIW, HTMLTemplate is pretty lax and not restricted to XHTML. The only XML-ish requirement is that elements need to be properly closed if they're to be used as template nodes, e.g. ... and

Re: templates

2006-01-31 Thread Richie Hindle
[thakadu] > The method of generation the table rows was exactly the same as > the example in the PyMeld documentation Did you try using toFormatString() to speed it up? See http://www.entrian.com/PyMeld/doco.html -- Richie Hindle [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/py

Re: templates

2006-01-31 Thread thakadu
copy of a prototypr row instance, you generate your new rows, which may have replaceable fields inside them, and finally you replace the single prototype row with all the new rows you have generated. The same test using the same data with Cheetah and native templates resulted in (on an oldish 600Mhz bo

Re: templates

2006-01-31 Thread has
it is more like XIST that I mentioned in another post. > The reason why this is slower than native templates seems clear: You > convert the whole page to objects in memory, and then serialize > everything back to HTML. PyMeld's not a good example to judge DOM-style templating by: the

Re: templates

2006-01-31 Thread Richie Hindle
[Christoph] > The reason why [PyMeld] is slower than native templates seems clear: You > convert the whole page to objects in memory, and then serialize > everything back to HTML. [Peter] > Unless I'm misremembering, PyMeld is special amongst the "total > decoupling

Re: templates

2006-01-31 Thread Peter Hansen
s, it is more like XIST that I mentioned in another post. > The reason why this is slower than native templates seems clear: You > convert the whole page to objects in memory, and then serialize > everything back to HTML. If you are only filling in a few words, then > native templates will

Re: templates

2006-01-31 Thread Christoph Zwerschke
eason why this is slower than native templates seems clear: You convert the whole page to objects in memory, and then serialize everything back to HTML. If you are only filling in a few words, then native templates will be surely much more effective. But if you are messing around with the structur

Re: templates

2006-01-30 Thread thakadu
://muti.co.za) I ended up using Python's built in %s templating engine. The reason for this was performance. The %s native system is extremely fast. In my somewhat informal benchmarks PyMeld was two orders of magnitude and Cheetah one order of magnitude slower than Python native templates. I don'

Re: templates

2006-01-30 Thread Christoph Zwerschke
Christoph Zwerschke wrote: > It must not always be templating systems. E.g. > > Nevow: http://divmod.org/projects/nevow Just saw that Newvow provides templates and a tag attribute language as well, not only the "Stan" part which is more like XIST. -- Christoph -- htt

Re: templates

2006-01-30 Thread Christoph Zwerschke
projecktzero wrote: > For some of the web programming I've done in Python, I've used > htmltmpl. I had some experience with it in Perl, and found a Python > version. > What web templating systems do you use and why? BTW, there are also a couple of other very clever concepts for creating web pages

Re: templates

2006-01-30 Thread Christoph Zwerschke
projecktzero wrote: > I like that there's nearly a complete separation between the > presentation and the code. This is great when one person is designing > the pages and another is writing the code to drive those pages. > ... > What web templating systems do you use and why? A plethora of such Py

Re: templates

2006-01-30 Thread Bruno Desthuilliers
ossibly better out there. May be... Depending on your definition of "better" !-) > I'm curious about other templating systems. Then here are two starting points: http://www.webwareforpython.org/Papers/Templates/ http://www.skreak.com/wp/ > I wouldn't be oppose

templates

2006-01-30 Thread projecktzero
For some of the web programming I've done in Python, I've used htmltmpl. I had some experience with it in Perl, and found a Python version. http://htmltmpl.sourceforge.net/ I like that there's nearly a complete separation between the presentation and the code. This is great when one person is des

Expression templates for arithmetic operations in python

2005-10-17 Thread David Welch
Hi, I am new to python so I thought I would write a quick and simple vector/matrix multiplication class in c++ and use it in python. Is it possible to overload the operators in python such a way that a tree of calculations is built which I can then pass to an evaluator written in c++ to calcul