Thanks Angelo! Exactly what I need. On Tue, Jan 12, 2010 at 7:11 PM, Angelo Gladding <[email protected]> wrote: > $(myscript).js > > On Tue, Jan 12, 2010 at 7:05 PM, Angelo Gladding <[email protected]> > wrote: >>> >>> Look, a $string. >>> Hark, an ${arbitrary + expression}. >>> Gawk, a $dictionary[key].function('argument'). >>> Cool, a $(limit)ing. >> >> http://webpy.org/docs/0.3/templetor >> >> On Tue, Jan 12, 2010 at 6:49 PM, jlist9 <[email protected]> wrote: >>> >>> Hi, >>> >>> I'd like to print a string "myscript.js" in HTML output. The "myscript" >>> part >>> of the output is passed in as a variable. However, the "." seems to be >>> causing >>> the templator to interpret the "." as Python code and I get an error: >>> >>> AttributeError: 'str' object has no attribute 'js' >>> >>> Here's the template: >>> >>> $def with(myscript) >>> $myscript.js >>> >>> Similarly, if I want to concatenate a static string with a variable in >>> a template, >>> is there a way to do that? In other words, I can use $$ to escape $, is >>> there >>> a way to escape "." and "" (empty string to separate the variable and the >>> static text)? >>> >>> Thanks, >>> Jack >>> >>> -- >>> You received this message because you are subscribed to the Google Groups >>> "web.py" group. >>> To post to this group, send email to [email protected]. >>> To unsubscribe from this group, send email to >>> [email protected]. >>> For more options, visit this group at >>> http://groups.google.com/group/webpy?hl=en. >>> >>> >>> >> >> >> >> -- >> Angelo Gladding >> [email protected] > > > > -- > Angelo Gladding > [email protected] > > -- > You received this message because you are subscribed to the Google Groups > "web.py" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/webpy?hl=en. > >
-- You received this message because you are subscribed to the Google Groups "web.py" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/webpy?hl=en.
