I can choose songs to play by clicking rows in an html table. I also write text to the client as it becomes available, rather than doing it all at once.
19 lines
340 B
Python
19 lines
340 B
Python
# Bryan Schumaker (5 / 15 / 2011)
|
|
|
|
import pages
|
|
|
|
def format_path(path):
|
|
if path == "/":
|
|
path = "/index.html"
|
|
path = path.split("/")
|
|
return [cmp for cmp in path if cmp != '']
|
|
|
|
def find_file(path):
|
|
return pages.has_file(path)
|
|
|
|
def get_type(path):
|
|
return pages.file_type(path)
|
|
|
|
def send_file(write, path):
|
|
pages.page_text(write, path)
|