Trac-hacks would be the place for this, or just post it to PyPI.

--Noah

> -----Original Message-----
> From: [email protected] [mailto:[email protected]]
> On Behalf Of W. Martin Borgert
> Sent: Thursday, February 18, 2010 3:48 PM
> To: [email protected]
> Subject: [Trac] Macro for referencing values and do calculations
> 
> Hi,
> 
> I wrote a little macro for referencing values defined in the wiki and
> for calculations. One has to create a page named "wiki/Defines", with
> lines similar to the C preprocessor syntax:
> 
> define FOO 1
> define BAR 2
> define FOOBAR 1+2
> 
> One can use the defines anywhere in the wiki and calculate:
> 
> [[Calc(FOO)]] -> 1
> [[Calc(BAR*3)]] -> 6
> [[Calc(max(abs(sin(3*pi/2.)), cos(pi)))]] -> 1.0
> 
> Is this interesting for somebody? Or would you never ever use a macro
> that makes use of eval() for security reasons? Did I reinvent the
> wheel? Are there better solutions?
> 
> TIA for your comments, code attached
> 
> --
> You received this message because you are subscribed to the Google
> Groups "Trac Users" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to trac-
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/trac-users?hl=en.


-- 
You received this message because you are subscribed to the Google Groups "Trac 
Users" 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/trac-users?hl=en.

Reply via email to