#NEWLINE# def __init__( self , mapfile , variables = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } , output_dir = None , from_string = False , verbose = False ) : #NEWLINE# #INDENT# self . mapfile = mapfile #NEWLINE# self . variables = variables #NEWLINE# self . from_string = from_string #NEWLINE# self . verbose = verbose #NEWLINE# if mapfile : #NEWLINE# #INDENT# self . output_dir = output_dir #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if self . mapfile . startswith ( 'http' ) : #NEWLINE# #INDENT# self . output_dir = os . getcwd ( ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# self . output_dir = os . path . dirname ( self . mapfile ) #NEWLINE# #UNINDENT# #UNINDENT# self . start_time = 0 #NEWLINE# self . load_map_time = 0 #NEWLINE# self . mapfile_types = { #NEWLINE# #INDENT# 'xml' : 'XML mapfile' , #NEWLINE# 'mml' : 'Mapnik Markup Language' , #NEWLINE# 'py' : 'Python map variable' , #NEWLINE# #UNINDENT# } #NEWLINE# if self . from_string : #NEWLINE# #INDENT# self . file_type = 'xml' #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# self . file_type = self . get_type ( ) #NEWLINE# self . validate ( )