Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 36 lines (26 sloc) 0.704 kB
65646a9 @Mar2zz now used mv. tested and works for me.
Mar2zz authored
1 import sys
2 import os
3
4 rundir = os.path.dirname(os.path.abspath(__file__))
5
6 try:
7 frozen = sys.frozen
8 except AttributeError:
9 frozen = False
10
11 # Define path based on frozen state
12 if frozen:
13 path_base = os.environ['_MEIPASS2']
14 rundir = os.path.dirname(sys.executable)
15
16 else:
17 path_base = rundir
18
19 # Include paths
20 sys.path.insert(0, path_base)
21 sys.path.insert(0, os.path.join(path_base, 'lib'))
22
2c606bb removed obsolete cherrypymodules
Mar2zz authored
23 import wsgiserver
65646a9 @Mar2zz now used mv. tested and works for me.
Mar2zz authored
24 from Maraschino import app
9fc6236 @mrkipling added beginnings of CherryPy support
mrkipling authored
25 from settings import *
26
27 d = wsgiserver.WSGIPathInfoDispatcher({'/': app})
28 server = wsgiserver.CherryPyWSGIServer(('0.0.0.0', CHERRYPY_PORT), d)
29
30 if __name__ == '__main__':
31 try:
32 server.start()
b38a98a @mrkipling pedantic tidying which is totally not necessary but whatever
mrkipling authored
33
9fc6236 @mrkipling added beginnings of CherryPy support
mrkipling authored
34 except KeyboardInterrupt:
35 server.stop()
Something went wrong with that request. Please try again.