comparison wsgiapp.py @ 23:6891c5523b69

load with neighbors :)
author Jeff Hammel <k0scist@gmail.com>
date Sun, 25 Jun 2017 18:13:43 -0700
parents 811adc9736eb
children
comparison
equal deleted inserted replaced
22:e69cb496324e 23:6891c5523b69
13 cities1000 = os.environ.get("CITIES1000") 13 cities1000 = os.environ.get("CITIES1000")
14 if not cities1000: 14 if not cities1000:
15 # XXX use a default not really appropriate for production 15 # XXX use a default not really appropriate for production
16 cities1000 = os.path.join(here, 'tests', 'data', 'cities1000.txt') 16 cities1000 = os.path.join(here, 'tests', 'data', 'cities1000.txt')
17 assert os.path.exists(cities1000) 17 assert os.path.exists(cities1000)
18 neighbors = '/home/jhammel/GlobalNeighbors/neighbors.dat'
19 assert os.path.exists(neighbors)
18 20
19 # WSGI App 21 # WSGI App
20 application = PassthroughFileserver(GlobalHandler(cities1000)) 22 application = PassthroughFileserver(GlobalHandler(cities1000,
23 neighbors_file=neighbors))
21 print ("Finished loading application") 24 print ("Finished loading application")
22 sys.stdout.flush() 25 sys.stdout.flush()