#NEWLINE# def process( source , dest ) : #NEWLINE# #INDENT# for ( dirpath , dirnames , filenames ) in os . walk ( source ) : #NEWLINE# #INDENT# dest_dir = os . path . realpath ( os . path . join ( dest , os . path . relpath ( dirpath , dirname ) ) ) #NEWLINE# os . mkdir ( dest_dir ) #NEWLINE# for filename in filenames : #NEWLINE# #INDENT# src_path = os . path . abspath ( os . path . join ( source , dirpath , filename ) ) #NEWLINE# dest_path = os . path . join ( dest_dir , filename ) #NEWLINE# if ( not filename . endswith ( '.html' ) ) : #NEWLINE# #INDENT# os . symlink ( src_path , dest_path ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# file ( dest_path , 'w' ) . write ( ssi . InlineIncludes ( src_path ) ) #NEWLINE# #UNINDENT# #UNINDENT# for dirname in dirnames [ : ] : #NEWLINE# #INDENT# if dirname . startswith ( '.' ) : #NEWLINE# #INDENT# dirnames . remove ( dirname )