text_combined: tejovathi p ssdrjyvklogmailcom hi gui applicaionalong threads run button pressed gui separate thread starts thread created using beginthreadex required activity thread executed want locals present inside threads run function avaialbe gui class thread class created eg mainpy class workerthreadthreadingthread def __init__self threadingthread__init__self start thread invoke run method selfstart def runself start thread executed selffunc separate thread selfworkerthread tid win32processbeginthreadexnone 0 selffunc 1 def funcself execfiletemppy class guiwxframe def __init__self def createthreadself selfworkerthread workerthread name _main_ temppy 1 j 2 k 4 while10000 print print j print k 11 j j2 k k 3 thread executin func printing j k main gui thread get values j k tried sysmodules sys_current_frames vars nothing worked ideally locals func passed gui thread wed 06 aug 2008 215645 0530 py2exeusers regarding threads locals