Beispiel #1
0
 def SvcStop(self):
     self.ReportServiceStatus(win32service.SERVICE_STOP_PENDING)
     import gramex
     gramex.shutdown()
     win32event.SetEvent(self.hWaitStop)
     servicemanager.LogMsg(servicemanager.EVENTLOG_INFORMATION_TYPE,
                           servicemanager.PYS_SERVICE_STOPPED, (self._svc_name_, ''))
Beispiel #2
0
 def check_exit():
     if exit[0] is True:
         shutdown()
     # If Ctrl-D is pressed, run the Python debugger
     char = debug.getch()
     if char == b'\x04':
         import ipdb as pdb  # noqa
         pdb.set_trace()  # noqa
     # If Ctrl-B is pressed, start the browser
     if char == b'\x02':
         browser = webbrowser.get()
         browser.open(url)
Beispiel #3
0
def stop_gramex():
    '''Terminate Gramex'''
    if info.thread is not None:
        gramex.shutdown()
        info.thread = None