<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-4254700519123054138</id><updated>2011-04-21T22:17:36.350-07:00</updated><category term='Python'/><category term='Plugin'/><category term='TurboGears'/><category term='StringTemplate'/><category term='Buffet'/><category term='Templates'/><title type='text'>RamonTurboGears</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://ramontg.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4254700519123054138/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://ramontg.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Ram</name><uri>http://www.blogger.com/profile/03503692967468323994</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>4</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-4254700519123054138.post-5241019089719318612</id><published>2008-01-17T15:36:00.000-08:00</published><updated>2008-01-17T15:46:36.386-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Templates'/><category scheme='http://www.blogger.com/atom/ns#' term='TurboGears'/><category scheme='http://www.blogger.com/atom/ns#' term='StringTemplate'/><title type='text'>Changing the default template engine in Turbogears</title><content type='html'>By default TG uses "kid" as its templating language. To change that go to wiki20/config/app.cfg&lt;br /&gt;&lt;br /&gt;and search for&lt;br /&gt;# tg.defaultview = "kid".  copy it down and change to antlr_string.&lt;br /&gt;  tg.defaultview = "antlr_string"&lt;br /&gt;&lt;br /&gt;Change the extension of all your templates to ".st"&lt;br /&gt;&lt;br /&gt;start your server again and lo and behold, you have a welcome.st greeting you at the browser:).&lt;br /&gt;&lt;br /&gt;=====&lt;br /&gt;If you are feeling a little naughty, try this:&lt;br /&gt;1. in the plugin make the extesion as ".kid" instead of ".st"&lt;br /&gt;2. But change everything else to use antlr string template.&lt;br /&gt;3. Now your kid templates are rendered by AST.&lt;br /&gt;4. if you carefully chose py:replace and py:strip attributes, you can enclose your AST syntax in that.&lt;br /&gt;5. Now when kid processes those templates, you dont see any of your AST code, when AST processes, you might see some jargon, but you can be careful and test on both engines and get good output :).&lt;br /&gt;&lt;br /&gt;==&lt;br /&gt;What you lose in this process is a strict enforcement of well formedness etc..&lt;br /&gt;But what you gain is a clear line of separation between controller and view.&lt;br /&gt;&lt;br /&gt;The only "disadvantage" if any is that the controller should know before hand what the keys used in the template are.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4254700519123054138-5241019089719318612?l=ramontg.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ramontg.blogspot.com/feeds/5241019089719318612/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4254700519123054138&amp;postID=5241019089719318612' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4254700519123054138/posts/default/5241019089719318612'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4254700519123054138/posts/default/5241019089719318612'/><link rel='alternate' type='text/html' href='http://ramontg.blogspot.com/2008/01/changing-default-template-engine-in.html' title='Changing the default template engine in Turbogears'/><author><name>Ram</name><uri>http://www.blogger.com/profile/03503692967468323994</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4254700519123054138.post-7747540103311258338</id><published>2008-01-17T15:29:00.000-08:00</published><updated>2008-01-17T15:36:24.599-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='TurboGears'/><category scheme='http://www.blogger.com/atom/ns#' term='StringTemplate'/><category scheme='http://www.blogger.com/atom/ns#' term='Plugin'/><category scheme='http://www.blogger.com/atom/ns#' term='Python'/><title type='text'>installing the plugin</title><content type='html'>now edit setup.py to look like the following.&lt;br /&gt;&lt;br /&gt;then follow the standard python setup.py config, build and install --prefix .&lt;br /&gt;&lt;br /&gt;After this step if you try tg-admin info at the command line, you should see something like the following in the output [ your versions may vary]:&lt;br /&gt;&lt;br /&gt;Template Engines&lt;br /&gt;&lt;br /&gt;* genshi-markup (Genshi 0.4.1)&lt;br /&gt;* genshi-text (Genshi 0.4.1)&lt;br /&gt;* genshi (Genshi 0.4.1)&lt;br /&gt;* kid (TurboKid 1.0.1)&lt;br /&gt;* cheetah (TurboCheetah 0.9.5)&lt;br /&gt;* json (TurboJson 1.0)&lt;br /&gt;* mako (Mako 0.1.6)&lt;br /&gt;* antlr_string (RamBuffetString 0.1.1)&lt;br /&gt;&lt;br /&gt;Now there is only one final step to start using ANTLR StringTemplate to create the view for your new website or wiki.&lt;br /&gt;&lt;br /&gt;&lt;div style="border-bottom: 2px solid gray;"&gt;&lt;table border="0" cellpadding="1" cellspacing="2" width="100%"&gt;&lt;br /&gt;&lt;tbody&gt;&lt;tr&gt;&lt;br /&gt; &lt;td&gt;&lt;small&gt;Pasted as &lt;b&gt;Python&lt;/b&gt; by &lt;b&gt;ramontg&lt;/b&gt; &lt;span id="controls"&gt;[ &lt;a href="http://www.blogger.com/p/3GEE1916.nln.html"&gt;Remove line numbers&lt;/a&gt; | &lt;a href="http://www.blogger.com/p/3GEE1916.txt"&gt;Show as plain text&lt;/a&gt; | &lt;a href="http://www.blogger.com/paste/"&gt;Create new paste&lt;/a&gt; ]&lt;/span&gt;&lt;/small&gt;&lt;/td&gt;&lt;br /&gt;&lt;br /&gt;&lt;/tr&gt;&lt;br /&gt;&lt;tr&gt;&lt;br /&gt; &lt;td&gt;&lt;small&gt;Description: setup.py for antlrstringtemplate&lt;/small&gt;&lt;/td&gt;&lt;br /&gt;&lt;/tr&gt;&lt;br /&gt;&lt;tr&gt;&lt;br /&gt; &lt;td&gt;&lt;small&gt;URL: http://rafb.net/p/3GEE1916.html&lt;/small&gt;&lt;/td&gt;&lt;br /&gt;&lt;/tr&gt;&lt;br /&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;table border="0" cellpadding="1" cellspacing="2"&gt;&lt;br /&gt;&lt;tbody&gt;&lt;tr&gt;&lt;br /&gt; &lt;td&gt;&lt;pre class="code"&gt;1&lt;br /&gt;2&lt;br /&gt;3&lt;br /&gt;4&lt;br /&gt;5&lt;br /&gt;6&lt;br /&gt;7&lt;br /&gt;8&lt;br /&gt;9&lt;br /&gt;10&lt;br /&gt;11&lt;br /&gt;12&lt;br /&gt;13&lt;br /&gt;14&lt;br /&gt;15&lt;br /&gt;16&lt;br /&gt;17&lt;/pre&gt;&lt;/td&gt;&lt;br /&gt;&lt;br /&gt; &lt;td width="100%"&gt;&lt;pre class="code" id="codemain"&gt;&lt;span class="keyword"&gt;from&lt;/span&gt; setuptools &lt;span class="keyword"&gt;import&lt;/span&gt; setup, find_packages&lt;br /&gt;&lt;br /&gt;setup(&lt;br /&gt;   name=&lt;span class="literal"&gt;"RamBuffetString"&lt;/span&gt;,&lt;br /&gt;   version=&lt;span class="literal"&gt;"0.1.1"&lt;/span&gt;,&lt;br /&gt;   description=&lt;span class="literal"&gt;"Python plugin for ANTLR StringTemplate"&lt;/span&gt;,&lt;br /&gt;   author=&lt;span class="literal"&gt;"Sriram Durbha"&lt;/span&gt;,&lt;br /&gt;   author_email=&lt;span class="literal"&gt;"sriram.durbha@gmail.com"&lt;/span&gt;,&lt;br /&gt;   url=&lt;span class="literal"&gt;"http://ramontg.blogspot.com"&lt;/span&gt;,&lt;br /&gt;   &lt;span class="comment"&gt;#scripts = [],&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;    packages=find_packages(),&lt;br /&gt;   zip_safe=False,&lt;br /&gt;   entry_points = &lt;span class="literal"&gt;""&lt;/span&gt;&lt;span class="literal"&gt;"&lt;br /&gt;       [python.templating.engines]&lt;br /&gt;       antlr_string = buffetstring.stringsupport:AntlrStringTemplatePlugin&lt;br /&gt;   "&lt;/span&gt;&lt;span class="literal"&gt;""&lt;/span&gt;&lt;br /&gt;   )&lt;/pre&gt;&lt;/td&gt;&lt;br /&gt;&lt;/tr&gt;&lt;br /&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4254700519123054138-7747540103311258338?l=ramontg.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ramontg.blogspot.com/feeds/7747540103311258338/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4254700519123054138&amp;postID=7747540103311258338' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4254700519123054138/posts/default/7747540103311258338'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4254700519123054138/posts/default/7747540103311258338'/><link rel='alternate' type='text/html' href='http://ramontg.blogspot.com/2008/01/installing-plugin.html' title='installing the plugin'/><author><name>Ram</name><uri>http://www.blogger.com/profile/03503692967468323994</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4254700519123054138.post-6333823779474399405</id><published>2008-01-17T15:24:00.000-08:00</published><updated>2008-01-17T15:29:54.813-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='TurboGears'/><category scheme='http://www.blogger.com/atom/ns#' term='StringTemplate'/><category scheme='http://www.blogger.com/atom/ns#' term='Plugin'/><category scheme='http://www.blogger.com/atom/ns#' term='Python'/><category scheme='http://www.blogger.com/atom/ns#' term='Buffet'/><title type='text'>interfacing ANTLR StringTemplate and TurboGears</title><content type='html'>1. Follow previous post to install everything.&lt;br /&gt;&lt;br /&gt;Download http://projects.dowski.com/files/buffetstring/BuffetString-0.1.1.zip&lt;br /&gt;unzip and edit the file buffetstring/stringsupport.py to look like the following.&lt;br /&gt;&lt;br /&gt;Then follow the next post to change setup.py&lt;br /&gt;&lt;div style="border-bottom: 2px solid gray;"&gt;&lt;table border="0" cellpadding="1" cellspacing="2" width="100%"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;br /&gt; &lt;td&gt;&lt;small&gt;Pasted as &lt;b&gt;Python&lt;/b&gt; by &lt;b&gt;ramontg&lt;/b&gt; &lt;span id="controls"&gt;[ &lt;a href="http://www.blogger.com/p/ZmYxfJ83.nln.html"&gt;Remove line numbers&lt;/a&gt; | &lt;a href="http://www.blogger.com/p/ZmYxfJ83.txt"&gt;Show as plain text&lt;/a&gt; | &lt;a href="http://www.blogger.com/paste/"&gt;Create new paste&lt;/a&gt; ]&lt;/span&gt;&lt;/small&gt;&lt;/td&gt;&lt;br /&gt;&lt;br /&gt;&lt;/tr&gt;&lt;br /&gt;&lt;tr&gt;&lt;br /&gt; &lt;td&gt;&lt;small&gt;Description: Plugin to use ANTLR string template on turbogears.&lt;/small&gt;&lt;/td&gt;&lt;br /&gt;&lt;/tr&gt;&lt;br /&gt;&lt;tr&gt;&lt;br /&gt; &lt;td&gt;&lt;small&gt;URL: http://rafb.net/p/ZmYxfJ83.html&lt;/small&gt;&lt;/td&gt;&lt;br /&gt;&lt;/tr&gt;&lt;br /&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;table border="0" cellpadding="1" cellspacing="2"&gt;&lt;br /&gt;&lt;tbody&gt;&lt;tr&gt;&lt;br /&gt; &lt;td&gt;&lt;pre class="code"&gt;1&lt;br /&gt;2&lt;br /&gt;3&lt;br /&gt;4&lt;br /&gt;5&lt;br /&gt;6&lt;br /&gt;7&lt;br /&gt;8&lt;br /&gt;9&lt;br /&gt;10&lt;br /&gt;11&lt;br /&gt;12&lt;br /&gt;13&lt;br /&gt;14&lt;br /&gt;15&lt;br /&gt;16&lt;br /&gt;17&lt;br /&gt;18&lt;br /&gt;19&lt;br /&gt;20&lt;br /&gt;21&lt;br /&gt;22&lt;br /&gt;23&lt;br /&gt;24&lt;br /&gt;25&lt;br /&gt;26&lt;br /&gt;27&lt;br /&gt;28&lt;br /&gt;29&lt;br /&gt;30&lt;br /&gt;31&lt;br /&gt;32&lt;br /&gt;33&lt;br /&gt;34&lt;br /&gt;35&lt;br /&gt;36&lt;br /&gt;37&lt;br /&gt;38&lt;br /&gt;39&lt;br /&gt;40&lt;br /&gt;41&lt;br /&gt;42&lt;br /&gt;43&lt;br /&gt;44&lt;br /&gt;45&lt;br /&gt;46&lt;br /&gt;47&lt;br /&gt;48&lt;br /&gt;49&lt;br /&gt;50&lt;br /&gt;51&lt;br /&gt;52&lt;br /&gt;53&lt;br /&gt;54&lt;br /&gt;55&lt;br /&gt;56&lt;br /&gt;57&lt;br /&gt;58&lt;br /&gt;59&lt;br /&gt;60&lt;br /&gt;61&lt;br /&gt;62&lt;br /&gt;63&lt;/pre&gt;&lt;/td&gt;&lt;br /&gt;&lt;br /&gt; &lt;td width="100%"&gt;&lt;pre class="code" id="codemain"&gt;&lt;span class="literal"&gt;""&lt;/span&gt;&lt;span class="literal"&gt;"&lt;br /&gt;BuffetString is more of a proof-of-concept and example&lt;br /&gt;'python.templating.engines' plugin than anything else.  If it is useful&lt;br /&gt;to you, great.  Otherwise, just read over the source for a simple example&lt;br /&gt;of making a plugin.&lt;br /&gt;"&lt;/span&gt;&lt;span class="literal"&gt;""&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="keyword"&gt;import&lt;/span&gt; string&lt;br /&gt;&lt;span class="keyword"&gt;import&lt;/span&gt; os&lt;br /&gt;&lt;span class="keyword"&gt;import&lt;/span&gt; stringtemplate3&lt;br /&gt;&lt;br /&gt;&lt;span class="keyword"&gt;class &lt;/span&gt;AntlrStringTemplatePlugin(object):&lt;br /&gt;   &lt;span class="comment"&gt;# all template plugins need to define a default file extension&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;    extension = &lt;span class="literal"&gt;".st"&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;   &lt;span class="keyword"&gt;def&lt;/span&gt; __init__(self, extra_vars_func=None, config=None):&lt;br /&gt;       &lt;span class="literal"&gt;""&lt;/span&gt;&lt;span class="literal"&gt;"extra_vars_func == optional callable() that returns a dict&lt;br /&gt;       config == optional dict() of configuration settings&lt;br /&gt;       "&lt;/span&gt;&lt;span class="literal"&gt;""&lt;/span&gt;&lt;br /&gt;       self.get_extra_vars = extra_vars_func&lt;br /&gt;       &lt;span class="keyword"&gt;if&lt;/span&gt; config:&lt;br /&gt;           self.config = config&lt;br /&gt;       &lt;span class="keyword"&gt;else&lt;/span&gt;:&lt;br /&gt;           self.config = dict()&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;   &lt;span class="keyword"&gt;def&lt;/span&gt; load_template(self, template_name):&lt;br /&gt;       &lt;span class="literal"&gt;""&lt;/span&gt;&lt;span class="literal"&gt;"template_name == dotted.path.to.template (without .ext)&lt;br /&gt;&lt;br /&gt;       The dotted notation is present because many template engines&lt;br /&gt;       allow templates to be compiled down to Python modules.  TurboGears&lt;br /&gt;       uses that feature to its adavantage, and for ease of integration&lt;br /&gt;       the python.templating.engines plugin format requires the path to&lt;br /&gt;       the template to be supplied as a dotted.path.to.template regardless&lt;br /&gt;       of whether is is a module or not.&lt;br /&gt;&lt;br /&gt;       In the case of string.Template templates, they are just simple text&lt;br /&gt;       files, so we deal with the dotted notation and translate it into a&lt;br /&gt;       standard file path to open the text file.&lt;br /&gt;       "&lt;/span&gt;&lt;span class="literal"&gt;""&lt;/span&gt;       &lt;br /&gt;       parts = template_name.split(&lt;span class="literal"&gt;'.'&lt;/span&gt;)&lt;br /&gt;       template_name = &lt;span class="literal"&gt;"%s"&lt;/span&gt; % (parts.pop())&lt;br /&gt;       template_path = os.path.join(*parts)&lt;br /&gt;       self.group = stringtemplate3.StringTemplateGroup(&lt;span class="literal"&gt;"myGroup"&lt;/span&gt;, template_path)&lt;br /&gt;       template_obj = self.group.getInstanceOf(template_name)&lt;br /&gt;       &lt;span class="keyword"&gt;return&lt;/span&gt; template_obj&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;   &lt;span class="keyword"&gt;def&lt;/span&gt; render(self, info, format=&lt;span class="literal"&gt;"html"&lt;/span&gt;, fragment=False, template=None):&lt;br /&gt;       &lt;span class="literal"&gt;""&lt;/span&gt;&lt;span class="literal"&gt;"info == dict() of variables to stick into the template namespace&lt;br /&gt;       format == output format if applicable&lt;br /&gt;       fragment == special rules about rendering part of a page&lt;br /&gt;       template == dotted.path.to.template (without .ext)&lt;br /&gt;&lt;br /&gt;       You might not need all of these arguments.  info and template are the&lt;br /&gt;       only ones used in this simple example.&lt;br /&gt;       "&lt;/span&gt;&lt;span class="literal"&gt;""&lt;/span&gt;&lt;br /&gt;       vars = info&lt;br /&gt;       &lt;span class="comment"&gt;# check to see if we were passed a function get extra vars&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;        &lt;span class="keyword"&gt;if&lt;/span&gt; callable(self.get_extra_vars):&lt;br /&gt;           vars.update(self.get_extra_vars())&lt;br /&gt;       template_obj = self.load_template(template)&lt;br /&gt;       &lt;span class="keyword"&gt;for&lt;/span&gt; key &lt;span class="keyword"&gt;in&lt;/span&gt; vars.keys():&lt;br /&gt;           template_obj[key]=vars[key]&lt;br /&gt;       &lt;span class="keyword"&gt;return&lt;/span&gt; str(template_obj)&lt;/pre&gt;&lt;/td&gt;&lt;br /&gt;&lt;/tr&gt;&lt;br /&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4254700519123054138-6333823779474399405?l=ramontg.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ramontg.blogspot.com/feeds/6333823779474399405/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4254700519123054138&amp;postID=6333823779474399405' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4254700519123054138/posts/default/6333823779474399405'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4254700519123054138/posts/default/6333823779474399405'/><link rel='alternate' type='text/html' href='http://ramontg.blogspot.com/2008/01/interfacing-antlr-stringtemplate-and.html' title='interfacing ANTLR StringTemplate and TurboGears'/><author><name>Ram</name><uri>http://www.blogger.com/profile/03503692967468323994</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4254700519123054138.post-6225142073529076257</id><published>2008-01-17T10:53:00.000-08:00</published><updated>2008-01-17T15:22:00.943-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='StringTemplate'/><category scheme='http://www.blogger.com/atom/ns#' term='Python'/><title type='text'>python version of stringtemplate</title><content type='html'>This post details how to install it so that you can write local python programs and process your own templates.&lt;br /&gt;&lt;br /&gt;get the latest stringtemplate from stringtemplate.org . I have &lt;a href="http://fisheye2.cenqua.com/browse/stringtemplate/python/release/PyStringTemplate-3.1b1"&gt;PyStringTemplate-3.1b1&lt;/a&gt;&lt;br /&gt;make sure you note the dependencies properly.&lt;br /&gt;&lt;br /&gt;the numbers on the left are from my history list. don't type those!!&lt;br /&gt;&lt;br /&gt;1091  wget http://antlr2.org/download/antlr-2.7.7.tar.gz&lt;br /&gt;1093  tar xzf antlr-2.7.7.tar.gz&lt;br /&gt;&lt;br /&gt;1131  cd antlr-2.7.7/lib/python&lt;br /&gt;&lt;br /&gt;1138  ls&lt;br /&gt;1139  python setup.py config&lt;br /&gt;1140  python setup.py build&lt;br /&gt;1141  python setup.py install --prefix=/local/local/apps/python/&lt;br /&gt;1142  p&lt;br /&gt;1143  cd ../../../stringtemplate3-3.1b1/&lt;br /&gt;1144  l&lt;br /&gt;1145  python setup.py config&lt;br /&gt;1146  python setup.py build&lt;br /&gt;1147  python setup.py install --prefix=/local/local/apps/python/&lt;br /&gt;&lt;br /&gt;Thats all there is to it.   now you can try all the cool code on the stringtemplate.org site.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4254700519123054138-6225142073529076257?l=ramontg.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ramontg.blogspot.com/feeds/6225142073529076257/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4254700519123054138&amp;postID=6225142073529076257' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4254700519123054138/posts/default/6225142073529076257'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4254700519123054138/posts/default/6225142073529076257'/><link rel='alternate' type='text/html' href='http://ramontg.blogspot.com/2008/01/python-version-of-stringtemplate.html' title='python version of stringtemplate'/><author><name>Ram</name><uri>http://www.blogger.com/profile/03503692967468323994</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>
