Re: [Zope] string formatting

2010-08-15 Thread robert rottermann
Am 14.08.2010 22:23, schrieb Jaroslav Lukesh: DTML is your friend, not evil. JL. when I was a kid I used to spend my holidays with my grandfather. he was an old farmer and used to work with horse and carriage. it was great and I loved the horses..

Re: [Zope] string formatting

2010-08-14 Thread Andreas Jung
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Jaroslav Lukesh wrote: It is easy: dtml-call REQUEST.set('signumfix2',signum2[1:4]) dtml-call REQUEST.set('signumfix2', _.int(signumfix2)+1) dtml-call REQUEST.set('signumFinal', 'B' + _.str(1000 + signumfix2)[1:] ) Hopefully such code won't

Re: [Zope] string formatting

2010-08-14 Thread Jaroslav Lukesh
- Puvodní zpráva - Od: Andreas Jung li...@zopyx.com Jaroslav Lukesh wrote: It is easy: dtml-call REQUEST.set('signumfix2',signum2[1:4]) dtml-call REQUEST.set('signumfix2', _.int(signumfix2)+1) dtml-call REQUEST.set('signumFinal', 'B' + _.str(1000 + signumfix2)[1:] ) Hopefully

Re: [Zope] string formatting

2010-08-14 Thread Andreas Jung
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Jaroslav Lukesh wrote: - Puvodní zpráva - Od: Andreas Jung li...@zopyx.com Jaroslav Lukesh wrote: It is easy: dtml-call REQUEST.set('signumfix2',signum2[1:4]) dtml-call REQUEST.set('signumfix2', _.int(signumfix2)+1) dtml-call

[Zope] string formatting

2010-08-13 Thread Ebbe Kvist
Hi all, I want to process a variable, signum2, which is picked up from a MySQL database. The content of the variable is B006. The aim is to process this variable so the result will be B007 and it will then be saved as part of a new record in the database. The core process is to increment the

Re: [Zope] string formatting

2010-08-13 Thread Andreas Jung
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Firstly, why DTML? Secondly, write a browser view or your app logic into a Python Script and use a ZPT for calling the script and rendering the result. Such code as seen below makes us shiver. Andreas Ebbe Kvist wrote: Hi all, I want to process

Re: [Zope] string formatting

2010-08-13 Thread Jonathan (dev101)
can call from dtml you don’t have to use zpt). Jonathan From: zope-boun...@zope.org [mailto:zope-boun...@zope.org] On Behalf Of Ebbe Kvist Sent: August-13-10 12:17 PM To: zope@zope.org Subject: [Zope] string formatting Hi all, I want to process a variable, signum2, which

Re: [Zope] string formatting

2010-08-13 Thread Jeff Peterson
Subject: [Zope] string formatting Hi all, I want to process a variable, signum2, which is picked up from a MySQL database. The content of the variable is B006. The aim is to process this variable so the result will be B007 and it will then be saved as part of a new record in the database. The core

Re: [Zope] string formatting

2010-08-13 Thread Jeff Peterson
Webmaster Crary Industries, Inc. From: zope-boun...@zope.org [mailto:zope-boun...@zope.org] On Behalf Of Ebbe Kvist Sent: Friday, August 13, 2010 11:17 AM To: zope@zope.org Subject: [Zope] string formatting Hi all, I want to process a variable, signum2, which is picked up from a MySQL database

Re: [Zope] string formatting

2010-08-13 Thread Jaroslav Lukesh
It is easy: dtml-call REQUEST.set('signumfix2',signum2[1:4]) dtml-call REQUEST.set('signumfix2', _.int(signumfix2)+1) dtml-call REQUEST.set('signumFinal', 'B' + _.str(1000 + signumfix2)[1:] ) DTML is simple and fine :) - Puvodní zpráva - Od: Ebbe Kvist I want to process a variable,