G
Gert Cuykens
I would like to lauch a server from outside the side package directory
how do i specify a path with import
#/home/gert/Desktop/www/db/py/start-server.py
import cherrypy
class HelloWorld:
def index(self):
return #external htm file Hello world!
index.exposed = True
if __name__ == '__main__': # ??? dont know what is this for
import os.path
conf = os.path.join(os.path.dirname(__file__), 'conf-server.py')
cherrypy.config.update(conf)
cherrypy.quickstart(HelloWorld())
else:
cherrypy.tree.mount(HelloWorld()) # ??? dont know what is this for
#/home/gert/Desktop/www/db/py/conf-server.py
[global]
server.socket_port = 8080
server.thread_pool = 10
how do i specify a path with import
#/home/gert/Desktop/www/db/py/start-server.py
import cherrypy
class HelloWorld:
def index(self):
return #external htm file Hello world!
index.exposed = True
if __name__ == '__main__': # ??? dont know what is this for
import os.path
conf = os.path.join(os.path.dirname(__file__), 'conf-server.py')
cherrypy.config.update(conf)
cherrypy.quickstart(HelloWorld())
else:
cherrypy.tree.mount(HelloWorld()) # ??? dont know what is this for
#/home/gert/Desktop/www/db/py/conf-server.py
[global]
server.socket_port = 8080
server.thread_pool = 10