#NEWLINE# def generate_static_main_html( app ) : #NEWLINE# #INDENT# ( s , head , body , script ) = get_soup_head_body_and_scripts ( app ) #NEWLINE# basedir = os . path . dirname ( __file__ ) #NEWLINE# for fn in js_files_to_inject_to_frozen_app : #NEWLINE# #INDENT# full_fn = os . path . join ( basedir , fn ) #NEWLINE# with open ( full_fn , 'r' ) as f : #NEWLINE# #INDENT# script . append ( ( f . read ( ) + '\n' ) ) #NEWLINE# #UNINDENT# #UNINDENT# fill_head ( app , s , head ) #NEWLINE# rdoc = RemoteDocument ( ) #NEWLINE# app ( ) . initialize ( remote_document = script , main_html = s . prettify ( ) ) #NEWLINE# generated_scripts = rdoc . pop_all_code ( ) #NEWLINE# script . append ( ( ( '\n\n' + generated_scripts ) + '\n\n' ) ) #NEWLINE# return s . prettify ( )