[Zope] how to display hex data ?
Jose Soares
jose@sferacarta.com
Fri, 06 Apr 2001 15:20:00 +0200
Thank you Kai to reply to may question, I tried using fmt="%x" but Zope gives me
the following message:
TYPE:
TypeError
VALUE:
illegal argument type for built-in operation
Traceback (innermost last):
File /usr/lib/zope/lib/python/ZPublisher/Publish.py, line 171, in publish
File /usr/lib/zope/lib/python/ZPublisher/mapply.py, line 160, in mapply
(Object: query1)
File /usr/lib/zope/lib/python/ZPublisher/Publish.py, line 112, in call_object
(Object: query1)
File /usr/lib/zope/lib/python/OFS/DTMLMethod.py, line 172, in __call__
(Object: query1)
File /usr/lib/zope/lib/python/DocumentTemplate/DT_String.py, line 549, in
__call__
(Object: query1)
File /usr/lib/zope/lib/python/DocumentTemplate/DT_In.py, line 637, in renderwb
(Object: sql(cmd=cmd_sql))
File /usr/lib/zope/lib/python/DocumentTemplate/DT_In.py, line 717, in renderwob
(Object: sequence-item)
File /usr/lib/zope/lib/python/DocumentTemplate/DT_Var.py, line 313, in render
(Object: OID)
(Info: ('OID', '\325\000\000\000\002\000\000\000', {'fmt': '%x', '': 'OID'}))
TypeError: illegal argument type for built-in operation
Any ideas?
Kai Hofmann wrote:
> > I'm trying to display hex values without success.
>
> > OID DISTRETTO
> > ================ =========
> > a200000002000100 I10500
> > a200000002000200 I10500
> > a200000002000300 I10500
> > a200000002000400 I10500
> > a200000002000500 I10500
> > a200000002000600 I10500
>
> I am a stupid beginner, but I would try something like
>
> <dtml-var .... fmt="%x">
>
> because it seems that C-style printf formatting is supported - if this does not
> work, because ZOPE/python supports only 2-digi hex-values - then try to cut
> your larger numbers into smaller one by "/ $100"
>
> Kai
>
> --
> Institut für Seeverkehrswirtschaft und Logistik http://www.isl.org/
> Dipl.-Inform. Kai Hofmann mailto:hofmann@isl.org
> Universitaetsallee GW1 Block A phone:+49 421 22096-83
> D-28359 Bremen fax:+49 421 22096-55
>
> _______________________________________________
> Zope maillist - Zope@zope.org
> http://lists.zope.org/mailman/listinfo/zope
> ** No cross posts or HTML encoding! **
> (Related lists -
> http://lists.zope.org/mailman/listinfo/zope-announce
> http://lists.zope.org/mailman/listinfo/zope-dev )