I want to trace an import statement, but only one so I set import os os.environ["PYTHONVERBOSE"] = "1" import wx del os.environ["PYTHONVERBOSE"] but the import wx was NOT traced. Neither was it traced if I use os.putenv. Does anyone know how to set python for import tracing within a script?