
Untitled
By: a guest on
Jun 12th, 2012 | syntax:
Python | size: 0.77 KB | hits: 18 | expires: Never
#!/bin/python
import os
# provides a way to split routes files in Play
# the file "routes.list" should contain a list of the routes file names (all ending with .routes), delimited by line breaks
# this file should be placed in the root directory of your Play project.
# this is a naieve way to fix the problem
# but could be a temporary way for us to split our routes files up based on subprojects
# we already organize our single routes file this way, so it isn't really a massive change.
with open('conf/routes.list') as fileList:
stringToWrite = ''
for line in fileList:
with open('conf/' + line + '.routes') as currentFile:
stringToWrite += currentFile.read()
with open('conf/routes') as finalFile:
finalFile.write(stringToWrite)
os.system('play')