%PDF- %PDF-
Direktori : /usr/local/lib/python2.7/test/ |
Current File : //usr/local/lib/python2.7/test/win_console_handler.pyc |
ó Nêáac @ s d Z d d l m Z m Z d d l Z d d l Z d d l Z d d l Z e e j e j ƒ Z d „ Z e e ƒ Z e j j j Z e e j f e _ e j e _ e d k re e d ƒ sÐ d GHe d ƒ n e j d d e j d ƒ Z d e d <x e rqù Wn d S( sY Script used to test os.kill on Windows, for issue #1220212 This script is started as a subprocess in test_os and is used to test the CTRL_C_EVENT and CTRL_BREAK_EVENT signals, which requires a custom handler to be written into the kill target. See http://msdn.microsoft.com/en-us/library/ms685049%28v=VS.85%29.aspx for a similar example in C. iÿÿÿÿ( t wintypest WINFUNCTYPENc C s- | t j k r n | t j k r$ n d GHd S( s8 Handle a sig event and return 0 to terminate the processs UNKNOWN EVENTi ( t signalt CTRL_C_EVENTt CTRL_BREAK_EVENT( t sig( ( s4 /usr/local/lib/python2.7/test/win_console_handler.pyt _ctrl_handler s t __main__i s# Unable to add SetConsoleCtrlHandlert 1i ( t __doc__t ctypesR R R t mmapt syst BOOLt DWORDt HandlerRoutineR t ctrl_handlert windllt kernel32t SetConsoleCtrlHandlert argtypest restypet __name__t exitt argvt mt True( ( ( s4 /usr/local/lib/python2.7/test/win_console_handler.pyt <module> s&