<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=iso-8859-1" http-equiv=Content-Type>
<META name=GENERATOR content="MSHTML 10.00.9200.16521">
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT size=2 face=Arial>Ok, one thing now came across is the cgitb module,
and, the following bit of code somewhere near top might help it at least log
errors a bit better:</FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT size=2 face=Arial>import cgitb, os</FONT></DIV>
<DIV><FONT size=2 face=Arial>cgitb.enable(format="text",
logdir=os.environ["APPDATA"] + <A
href="file://\\appAuthor\\appName">\\appAuthor\\appName</A>)</FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT size=2 face=Arial>That should then, hopefully, at least generate a
form of error/exception log in the location I specify as logdir.</FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT size=2 face=Arial>Stay well</FONT></DIV>
<DIV><BR>Jacob Kruger<BR>Blind Biker<BR>Skype: BlindZA<BR>'...fate had broken
his body, but not his spirit...'<BR></DIV>
<BLOCKQUOTE
style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; PADDING-RIGHT: 0px; MARGIN-RIGHT: 0px">
<DIV style="FONT: 10pt arial">----- Original Message ----- </DIV>
<DIV
style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black"><B>From:</B>
<A title=jacob@blindza.co.za href="mailto:jacob@blindza.co.za">Jacob
Kruger</A> </DIV>
<DIV style="FONT: 10pt arial"><B>To:</B> <A title=python-win32@python.org
href="mailto:python-win32@python.org">python-win32@python.org</A> </DIV>
<DIV style="FONT: 10pt arial"><B>Sent:</B> Tuesday, December 17, 2013 05:44
AM</DIV>
<DIV style="FONT: 10pt arial"><B>Subject:</B> [python-win32] Exception
handling wrapper/function for somethinglike a whole class</DIV>
<DIV><BR></DIV>
<DIV><FONT size=2 face=Arial>Like subject line says, and while would generally
prefer to implement specific pieces of error handling try...except code
blocks, etc., per code/functionality section, am currently trying to figure
out why a test user is experiencing issues with some code making use of things
like user app data file locations, etc., and am not exactly sure how/why/when
errors/exceptions are occuring, and since this is happening on something like
a windows7 machine with UAC turned on, etc., and since these are currently
executing/operating as sort of py2exe 'compiled' applets, it's unable to
generate the sort of automatic error log files at the moment either - not sure
if relevant, but, used os.chdir to try changing the sort of active/current
directory to the app specific user data location early on during instantiation
of the classes, etc., but, doesn't seem to affect automated error logging
target location as such, and, I think the app trying to then generate those
automated error log files is then also raising file system access issues
itself.</FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT size=2 face=Arial>Anyway, while can implement try...except blocks
in all of the pieces of code, event handlers, function calls etc., I would
like to, for now implement something like where in PHP you can just assign
your own function to be the sort of default exception/error handler at some
stages, and just wondering how you could possibly do something like that for a
class object/element, etc.,such that it could then handle either all, or
multiple exception types, etc.?</FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT size=2 face=Arial>And, if am confused, or targeting the wrong
approach, you are also welcome to offer better suggestions/guidelines relating
to any form of exception handling approach, etc.?</FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT size=2 face=Arial>TIA</FONT></DIV>
<DIV><FONT size=2 face=Arial><BR>Jacob Kruger<BR>Blind Biker<BR>Skype:
BlindZA<BR>'...fate had broken his body, but not his
spirit...'<BR></FONT></DIV>
<P>
<HR>
<P></P>_______________________________________________<BR>python-win32 mailing
list<BR>python-win32@python.org<BR>https://mail.python.org/mailman/listinfo/python-win32<BR></BLOCKQUOTE></BODY></HTML>