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
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
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
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
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
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
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
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
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
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
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
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
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
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
> 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
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'
"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
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
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,
>
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
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
:
> 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
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
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
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
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
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
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'
%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> <
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
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()
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
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
*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
Start B2B storefronts on Alibaba, Show products to all buyers - Free!
http://finance4u.synthasite.com/
--
http://mail.python.org/mailman/listinfo/python-list
> 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
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
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
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
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
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'
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
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
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
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'
>
(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 &
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
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
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
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
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
[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
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
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
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
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
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
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
[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
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
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
[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
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
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
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
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
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
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
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
> 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,
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
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
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
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
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
[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
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
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
[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
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
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
://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'
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
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
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
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
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
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
88 matches
Mail list logo