At 01:05 PM 6/6/2001 -0700, Tavis Rudd wrote:
>On Wednesday 06 June 2001 12:28, Chuck Esterbrook wrote:
> > Have you tried it? It's 2 lines:
> >  >>> from TemplateServer.Server import TemplateServer as
> >  >>> ts print ts('$a', {'a':1})
> > $a
> > Doesn't work for me. What about you?
>
>Yes, it works fine with ver 0.8.2, though I can't vouch for 0.8.1.
>It also passes all 143 test cases.

Well I installed over 0.8.1. I tried setup.py's help and didn't see an 
option for un-install.

So now I removed TemplateServer from my Python directory. I then tried to 
import while in C:\ and got "unknown module" or whatever. This verifies the 
installation was gone. Then I went to the right directory and did this:

C:\All\Packages\Python\TemplateServer-0.8.2>python
ActivePython 2.0, build 202 (ActiveState Tool Corp.)
 >>> from TemplateServer.Server import TemplateServer as TS
 >>> print TS('$a', {'a': 1})
$a

So it still has the bug.

I ran Tests.py and got half failures:
----------------------------------------------------------------------
Ran 143 tests in 2.200s
FAILED (failures=71)


Here is the first failure:
======================================================================
FAIL: runTest (__main__.VerifyTemplateOutput)
----------------------------------------------------------------------
Traceback (most recent call last):
   File "Tests.py", line 69, in runTest
     assert output == self.expectedOutput, \
AssertionError: Template output mismatch
         Test Title: posixCases: single $var
         Input Template = %(template)s
         Expected Output = blarg
         Actual Output = $c


That's on Windows ME. On Linux, I get identical results:

[echuck@devo TemplateServer]$ python Tests.py > results.text
[echuck@devo TemplateServer]$ tail results.text
bloggs
#/arg

#/callMacro


----------------------------------------------------------------------
Ran 143 tests in 1.948s

FAILED (failures=71)



Are you testing your workspace for 0.8.2, or a fresh download of the 0.8.2 
package at http://calrudd.com/TemplateServer/?


> > >CHANGES TO NOTE:
> > >- the explicit tag closure is now /#
> > Does that mean that
> >          #end if
> > no longer works?
>
>You're referring to the end tag.  I'm referring to
>the explicit tag closure.  Remember it used to be ;#
>Implicit closures are the end of the line.
>
>But also remember that we scrapped #end if in favour of
>#/if many weeks ago.

Who is "we"?  :-)

At some point both were supported. I don't remember if both still are or 
not. I'm getting the impression that just #/if is supported now.


>I'm not totally set on this but, the reason I changed it
>from <# #>  was to make it
>symmetrical with the rest of the directives.
>I want to have only 2 tag types in TemplateServer:
>$placeholders and #directives.  Comments should be a type
>of directive <# #> doesn't fit with the rest of the syntax.  Ian
>suggested #comment.
>
>Velocity uses #*  blarg *# for multiline comments.  I could go
>for that as well.  It's almost symmetrical.

Comments are almost always special in various languages--because they 
really are special. :)   Hence Python's # and C's /* */ which have nothing 
to do with the rest of the language.

I thought <# ... #> was fine, but if you want something else and closer to 
directives, then I'd prefer   #/* blarg */#  or even  /* ... */

/* ... */ is already used in CSS and C so it has some mind share, even with 
designers...


-Chuck


_______________________________________________
Webware-devel mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/webware-devel

Reply via email to