On 2009-10-30, at 4:42 PM, Noah Kantrowitz wrote:

> The *Option classes are accessors, you use them in the context of  
> the class
> definition like this:
>
> class Blah(Component):
>    latex_path = PathOption('fss', etc etc)
>
>    def my_plugin_function(self, req):
>        print self.latex_path

Thanks, but that's not actually helping me  (and fortunately, I  
figured out another way to make this work, but from the POV of did you  
explain this in terms that a new-to-Python person could make sense of,  
I'm afraid you didn't).

Is there something special about class definition context?

Why would printing "self.latex_path" yield the desired string, instead  
of <Pathoption ... > like you get from "str"?

This looks like the same sort of thing I was doing -- treating it as  
if it were a String -- but you get a different result.  How?  Why?

but thanks, even so,

David


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Trac 
Users" group.
To post to this group, send email to trac-users@googlegroups.com
To unsubscribe from this group, send email to 
trac-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/trac-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to