The whole reason for using the logging interface is to make it something that 
could be completely customized in various ways.   To accomplish what you 
suggest, simply make a class that implements the basic logging interface and 
stores the messages in a list.    You should be able to pass your object into 
Ply using the debug or errorlog arguments to various functions such as yacc() 
or parse().

Cheers,
Dave


On Jan 14, 2013, at 1:37 PM, Steve Garland wrote:

> I am using Ply to parse information supplied to an HTML form.  Is there some 
> way
> to have Ply append error messages to a list from which they can be retrieved 
> by
> the Python script I use to process the form?  Since the HTML form and the 
> Python
> script will be hosted on a machine that is not under my control, I would 
> prefer
> not to use Ply's logging interface to write error messages to a log file.
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "ply-hack" 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 https://groups.google.com/groups/opt_out.
> 
> 

-- 
You received this message because you are subscribed to the Google Groups 
"ply-hack" 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 https://groups.google.com/groups/opt_out.


Reply via email to