So with a lot of help from friends and a programmer that works with us, we have just about completed our first wxPython GUI that we are going to use for a clients interface. For those that have a clue about basic programming (which I did NOT) I am sure that you are familiar with setting break points to troubleshoot your code. Even better than this (in my opinion and easier as well) is the use of logging. Using logging statements all over your code in areas that may be giving you problems, you can see where the issue may be occurring.
import logging logging.basicConfig(filename='dev.log',level=logging.DEBUG,filemode='w', format='%(filename)s::%(module)s::%(funcName)s::%(lineno)d %(levelname)s %(message)s' ) # above is the config/setup. Put at top of file. # here's some examples using it. # look in "dev.log" for output! def blah() : logging.debug("starting blah!") logging.debug("finished blah!") blah()
Now when you run your process you can check your dev.log to see if all of your logging statement are there. If they are not all there, then you can see where the last statement was and it helps to zero in on your problem.