3

"wf@sddZddZddZdS)cCstddS)NzContent-type: text/html 
)printrr-/home/sultans/web/python/demo/1intro/debug.pyenablesrcCsZddl}d}td}|jd||g|jd}|jj}x |D]}|jd}t|dq:WdS)	Nz/var/log/httpd/error_logtail)stdoutzutf-8z<br>)
subprocessstrPopenPIPEr	readlinesdecoder)r
Zerror_log_fileZ	num_linesproclineslinerrrdisplayErrors


rcCsddl}ddl}|j\}}}|j|}t}x2|D]*}|jd|d|d|d|dfq4Wtd|jtd|td|dS)	Nrz3File : %s , Line : %d, Func.Name : %s, Message : %szException type: %szException message: %szStack trace: %s)sys	tracebackexc_infoZ
extract_tblistappendr__name__)rrZex_typeZex_valueZex_tracebackZ
trace_backZstack_traceZtracerrrrs

*rN)rrrrrrr<module>s