Jython.
I.e: , TestFunc, trace_dispatch, .
, Jython , . "" PyDev, import pydevd;pydevd.settrace(suspend=False), ( : TestFunc ).
: suspend = False, .
import sys
import threading
def trace_dispatch(frame, event, arg):
print frame.f_code.co_filename, frame.f_code.co_name
sys.settrace(trace_dispatch)
threading.settrace(trace_dispatch)
from javax.swing import JFrame, JButton
def TestFunc(event):
print "Hey"
if __name__ == '__main__':
mainWindow = JFrame('Test',
defaultCloseOperation = JFrame.EXIT_ON_CLOSE,
size = (1024, 600))
mainWindow.add(JButton("Hey", actionPerformed = TestFunc))
mainWindow.visible = True