MCPcopy
hub / github.com/cherrypy/cherrypy / start

Method start

cherrypy/_cpmodpy.py:332–347  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

330 self.handler = handler
331
332 def start(self):
333 opts = ''.join([' PythonOption %s %s\n' % (k, v)
334 for k, v in self.opts])
335 conf_data = self.template % {'port': self.port,
336 'loc': self.loc,
337 'opts': opts,
338 'handler': self.handler,
339 }
340
341 mpconf = os.path.join(os.path.dirname(__file__), 'cpmodpy.conf')
342 with open(mpconf, 'wb') as f:
343 f.write(conf_data)
344
345 response = read_process(self.apache_path, '-k start -f %s' % mpconf)
346 self.ready = True
347 return response
348
349 def stop(self):
350 os.popen('apache -k stop')

Callers 1

setupFunction · 0.45

Calls 3

joinMethod · 0.80
writeMethod · 0.80
read_processFunction · 0.70

Tested by

no test coverage detected