import-bot (20211) [Avatar] Offline
#1
[Originally posted 11/30/03 by Anonymous]

Hi everyone,

I just started reading through CGIA and can't wait to get started with writing some code generators to simplify my J2EE development.

Is anyone aware of a Python templating module that works similar to ERb? I've seen Cheetah, which looks great from a template syntax perspective - however, it appears that you have put all your Python code in the template vs calling the template from another Python script.

I realize the book uses Ruby and the scripts are pretty close to what I want in the long run. However, if I'm going to learn and use a new scripting language, Python syntax seems a bit cleaner to me which is important over the long-haul since I won't be using the scripting language on a day-to-day basis.

TIA!
Peter
import-bot (20211) [Avatar] Offline
#2
Re: Is there anything like ERb available for Python?
[Originally posted 12/1/03 by Anonymous]

Please disregard my last message - I'm new to both Cheetah and Python and misinterpreted the Cheetah documentation.

After a little hacking I've been able to get Cheetah to generate a simple Java class with getters/setters for all the attributes. Now I better learn enough Python to avoid shooting myself in the foot. smilie
import-bot (20211) [Avatar] Offline
#3
Re: Is there anything like ERb available for Python?
[Originally posted 12/1/03 by jherr]

Thanks for the heads up on Cheetah. It looks great!
import-bot (20211) [Avatar] Offline
#4
Re: Is there anything like ERb available for Python?
[Originally posted 12/1/03 by pwhite]

My pleasure. I've only been using Cheetah and Python for the last couple of nights but can't imagine an easier way generate code - I'm using Hibernate mapping files as my "definition" files and I'm already generating my domain classes, DAOs, and WebWork2 actions. Thanks for writing an excellent book and turning me on to CG!
import-bot (20211) [Avatar] Offline
#5
Re: Is there anything like ERb available for Python?
[Originally posted 12/1/03 by Anonymous]

I love feedback like this!

Any interest in doing an interview for the Code Generation Network where you talk about your experiences?

Either way you can contact me directly at jack_d_herrington at codegeneration dot net.
import-bot (20211) [Avatar] Offline
#6
Re: Is there anything like ERb available for Python?
[Originally posted 12/1/03 by pwhite]

Sounds good to me, I'll drop you a line. smilie