Lines Matching refs:ctypes
163 # exposed at the Python level. This test relies on ctypes to get at it.
166 import ctypes
169 print "test_PyThreadState_SetAsyncExc can't import ctypes"
172 set_async_exc = ctypes.pythonapi.PyThreadState_SetAsyncExc
177 exception = ctypes.py_object(AsyncExc)
183 result = set_async_exc(ctypes.c_long(tid), exception)
229 result = set_async_exc(ctypes.c_long(-1), exception)
242 result = set_async_exc(ctypes.c_long(t.id), exception)
274 import ctypes
277 print("test_finalize_with_runnning_thread can't import ctypes")
281 import ctypes, sys, time, thread
290 ensure = ctypes.pythonapi.PyGILState_Ensure
291 release = ctypes.pythonapi.PyGILState_Release