#NEWLINE# @ staticmethod #NEWLINE# def enumerate_threads( ) : #NEWLINE# #INDENT# thread_entry = process . WinThread ( ) #NEWLINE# thread_entry . dwSize = ctypes . sizeof ( thread_entry ) #NEWLINE# snap = winproxy . CreateToolhelp32Snapshot ( windef . TH32CS_SNAPTHREAD , 0 ) #NEWLINE# threads = [ ] #NEWLINE# winproxy . Thread32First ( snap , thread_entry ) #NEWLINE# threads . append ( copy . copy ( thread_entry ) ) #NEWLINE# while winproxy . Thread32Next ( snap , thread_entry ) : #NEWLINE# #INDENT# threads . append ( copy . copy ( thread_entry ) ) #NEWLINE# #UNINDENT# return threads