[Zope] Debugging a python routine

Pascal Peregrina Pperegrina at Lastminute.com
Mon Jun 27 12:30:29 EDT 2005


Well, I guess that you want to debug here.lib.parse_file() as the rest is
quiet obvious...

If "parse_file" is a PythonScript, you can test it from the ZMI, and you
should get a stack trace if an exception is raised.

Pascal

-----Message d'origine-----
De : zope-bounces at zope.org [mailto:zope-bounces at zope.org]De la part de
Jonathan
Envoyé : lundi 27 juin 2005 17:57
À : John Poltorak; zope at zope.org
Objet : Re: [Zope] Debugging a python routine



----- Original Message ----- 
From: "John Poltorak" <jp at warpix.org>
> Can anyone suggest how I would go about debugging a Python routine like
> this through Zope?
>
>
>     <span
> tal:define="opts
> python:here.lib.parse_file(file=here.members,sepr=',',clone=1)">
>       <tal:block repeat="opt opts">
>          <li><a     tal:content="python:opt[1]"
>               tal:attributes="href python:opt[0]"></a></li>
>       </tal:block>
>     </span>


I would start by testing the python routine on its own (ie. without any ZPT stuff) to make sure it is producing what you expect, then add in the ZPT stuff bit-by-bit.


Jonathan 


_______________________________________________
Zope maillist  -  Zope at zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.

www.mimesweeper.com
**********************************************************************



More information about the Zope mailing list