zfill does not appear to be string method for the new syle (Python 2.X) strings. It is in the string module and so is accessed by import string string.zfill(string, width) In this case, zfill('11',5) produces '00011'. This works for me in a Python Script with Zope 2.5.1 and Python 2.1.3. On Sun, 8 Jun 2003, Adam Szpakowski wrote:
On Sunday 08 of June 2003 00:28, David Hassalevris wrote:
try import string return string.zfill(outa,6)
It's no use. Same error. Beside in my example "outa" was intended to be an output string adn "str1" an input one. So if zfill() is the method for string type (same as upper()) the form: "11".zfill(5) should give "00011". But it still gives an error.
Reagards,
-- Adam Szpakowski Silesian University of Technology - Institute of Physics Department of Optoelectronic e-mail: worf@optics.polsl.gliwice.pl
_______________________________________________ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )