be added to the context returned by this
method, just like the specified args and options parameters. This is
actually described as a possible reason for subclassing in readme.txt.
Not sure what you mean. Can you provide an example?
Charlie
--
Charlie Clark
eGenix.com
Professional Python
the pages
manually. Is there any way to change this?
Charlie
--
Charlie Clark
eGenix.com
Professional Python Services directly from the Source
Python/Zope Consulting and Support ...http://www.egenix.com/
mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/
mxODBC
Am 21.08.2007, 05:27 Uhr, schrieb Andreas Jung [EMAIL PROTECTED]:
See
http://www.zope.org/Collectors/Zope/2339
Thanks. So this means I don't need to write any additional tests? Glad to
know you've resolved it.
Charlie
--
Charlie Clark
eGenix.com
Professional Python Services directly
UnicodeDecodeError
for result = {'firstname':'charlie', 'surname':'Düsseldorf'}
but not if Python string formatting is used
tal:content tal:content=python: '%s %s' % (result['firstname'],
result['surname']) /
Is this the only workaround apart from decoding all return values?
Charlie
--
Charlie Clark
since then but the
changelog makes no reference to ZPT.
Andreas tried hard to control the inevitable string/unicode integration
problems. Maybe, you read the available documentation to find out
about your choices.
Have the ZPT docs been updated?
Charlie
--
Charlie Clark
eGenix.com
, in interpret
Module zope.tal.talinterpreter, line 754, in do_insertStructure_tal
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 4:
ordinal not in range(128)
Charlie
--
Charlie Clark
eGenix.com
Professional Python Services directly from the Source
Python/Zope
it lets you do.
Charlie
--
Charlie Clark
eGenix.com
Professional Python Services directly from the Source
Python/Zope Consulting and Support ...http://www.egenix.com/
mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/
mxODBC, mxDateTime, mxTextTools ...http
Am 06.11.2006, 23:12 Uhr, schrieb Dieter Maurer [EMAIL PROTECTED]:
Charlie Clark wrote at 2006-10-24 22:43 +0200:
Am 24.10.2006, 22:26 Uhr, schrieb Dieter Maurer [EMAIL PROTECTED]:
It does, but you need to use allowType...
Thanks for that.
import datetime
allow_type(datetime.datetime)
do
wrong code.
Why are you surprised that I am formatting a database result?
result.create_date.strftime('%d.%m.%Y') # line 31
This has been cast by psycopg to a Python datetime object which I have
added as an allowed type.
Charlie
--
Charlie Clark
eGenix.com
Professional Python Services
Am 24.10.2006, 22:26 Uhr, schrieb Dieter Maurer [EMAIL PROTECTED]:
Charlie Clark wrote at 2006-10-23 16:03 +0200:
...
ah, the problem seems that Python datetime returns extension types and
not
classes and Zope's security does not work with extension types!
It does, but you need to use
strftime('%d.%m.%Y') currently throws a security error as neither
mxDateTime nor even Python's own datetime methods are allowed by default
in PageTemplates.
Thanks
Charlie
--
Charlie Clark
eGenix.com
Professional Python Services directly from the Source
Python/Zope Consulting and Support
Am 23.10.2006, 14:36 Uhr, schrieb Andreas Jung [EMAIL PROTECTED]:
- lib/python/Products/PythonScripts/README.txt
Exactly the same mechanism? I'll give it a try.
Charlie
--
Charlie Clark
eGenix.com
Professional Python Services directly from the Source
Python/Zope Consulting and Support
Am 23.10.2006, 14:38 Uhr, schrieb Charlie Clark [EMAIL PROTECTED]:
Am 23.10.2006, 14:36 Uhr, schrieb Andreas Jung [EMAIL PROTECTED]:
- lib/python/Products/PythonScripts/README.txt
Exactly the same mechanism? I'll give it a try.
I still have the same problem:
import mx.DateTime, datetime
Am 23.10.2006, 15:13 Uhr, schrieb Charlie Clark [EMAIL PROTECTED]:
I still have the same problem:
import mx.DateTime, datetime
d1 = mx.DateTime.DateTime(2006, 10, 22)
print d1
print d1.strftime(%Y.%m.%d)
d2 = datetime.datetime(2006, 10, 22)
print d2
print d2.strftime(%Y.%m.%d)
return
them in. ZPT's run security checks on all objects which
might be one reason for slowing stuff down. I suspect if you rewrite
your code to use a single PythonScript then it will run a lot faster
and be a lot easier to work with.
Charlie
--
Charlie Clark
Helmholtzstr. 20
Düsseldorf
D- 40215
15 matches
Mail list logo