[Pythoncad-developer] Debug Function
CAD Application entire developed in Python
Status: Beta
Brought to you by:
matteoboscolo
From: Matteo B. <mat...@bo...> - 2010-02-05 08:18:08
|
Hi All, Before starting coding in pythoncad I would like to create a single module for debugging purpose. This module will have some global variable that will switch on and off the print of the debug and will have the possibility to write the log in IO windows or in a log file. This will be very important for debugging porpoise. The module will be something like this Class PythonCadTracer(object): def info(msg): def debug(msg): def error(msg): def in(msg): def out(msg): def warning(msg): def onWriteFile(self): def onWriteIO(self): the in and out function take care of the time spent doing the operation so in case of function this will be def myFunc(): pyTracer.in("myFunc") pyTracer.out("myFunc") the output will be Start function myFunc End function myFunc in 10 s Let me know ... Regards, Matteo |