Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(10)  |  Call(10)  |  Derive(0)  |  Import(0)

src/h/t/httpdrun-0.2.2/httpdrun/win/__init__.py   httpdrun(Download)
    apache2dev = None
    try:
        apache2dev = services.ServiceControl(service_name)
    except services.ServiceDoesNotExist:
        pass        # do nothing, expected
 
    try:
        apache2dev = services.ServiceControl(service_name)
    except services.ServiceDoesNotExist:
        print 'failed to install service, please check for errors in configuration file'
def config_service():
    """ (re)configure a winnt/2k/2k3/xp/vista service """
 
    service_name = get_service_name()
    apache2dev = services.ServiceControl(service_name)
def uninstall_service():
    """ uninstall a winnt/2k/2k3/xp/vista service """
 
    service_name = get_service_name()
    apache2dev = services.ServiceControl(service_name)
 
    try:
        apache2dev = services.ServiceControl(service_name)
    except services.ServiceDoesNotExist:
        print 'failed to open service, will install'