import importlib import tracesys import sys import os def teste(): print("7") print("8") print("9") print("10") print("11") print("12") print("13") print("14") def get_module_to_file( ): SY_BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)) + "/%s" % ("W64")) SY_BASE_DIR = SY_BASE_DIR.replace("\\", "/") path1 = os.path.join(SY_BASE_DIR) path1 = path1 + "/check.py" filename = os.path.realpath(path1) filename = filename.replace("\\", "/") filename = filename.replace(SY_BASE_DIR, ".") return filename file = get_module_to_file() # print(file) # from threading import Thread # t = Thread(target=teste) # t.start() tracesys.sys_settrace("lmuller", "session_login" ) tracesys.add_debug("lmuller", file,8, "lmuller", "session_login" ) teste() print("fim") # t = input()