Actually, since the point of this exercise was to create csv
files, I would not use any templating.
python has a good csv module, and it will correctly deal with escaping.
No templating system is going to get these details correct.
See
http://docs.python.org/library/csv.html#csv-fmt-params
I'd use repoze.bfg.jinja2 for this task.
http://pypi.python.org/pypi/repoze.bfg.jinja2/0.6
- C
On 2/11/10 1:52 PM, Miuler wrote:
*=English==*
Hi fiends, i am trying to generate a CSV file, and using templates type
zpt (.pt)
ok thanks, but what is the syntax chameleton_text? url?
2010/2/11 Tres Seaver tsea...@palladion.com
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Miuler wrote:
chameleon, puede o no puede renderizar txt? como?
'chameleon.text' lo puede, pero sin todas cosas que el otros pueden
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Miuler wrote:
ok thanks, but what is the syntax chameleton_text? url?
I mis-typed, thinking that I remembered a module named 'chameleon.text'.
In BFG, you can use the 'repoze.bfg.chameleon_text' helpers, e.g.:
from repoze.bfg.chamedeon_text
Mi class:
class csv_view(object):
def __init__(self, context, request):
self.context = context
self. request = request
def __call__(self):
return {'items': [1,2,3,4,5,6]}
hello, I'm trying this but fails:
===
This is why I said use repoze.bfg.jinja2.. Chameleon text templates have no
looping constructs and using Chameleon ZPT templates to produce anything except
XML is madness.
On 2/11/10 8:17 PM, Miuler wrote:
Mi class:
class csv_view(object):
def __init__(self, context, request):
thanks Chris McDonough.
pd. repoze.bfg.chameleon_text sucks!! :-(
2010/2/11 Chris McDonough chr...@plope.com
This is why I said use repoze.bfg.jinja2.. Chameleon text templates have
no
looping constructs and using Chameleon ZPT templates to produce anything
except
XML is madness.
On