#NEWLINE# def open( self , string_or_file ) : #NEWLINE# #INDENT# if isinstance ( string_or_file , basestring ) : #NEWLINE# #INDENT# string_or_file = ElementTree . fromstring ( string_or_file ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( not ElementTree . iselement ( self ) ) : #NEWLINE# #INDENT# string_or_file = ElementTree . parse ( string_or_file ) #NEWLINE# #UNINDENT# #UNINDENT# if ( string_or_file . getroot ( ) . tag == self . _get_qname ( 'gpx' ) ) : #NEWLINE# #INDENT# self . _root = string_or_file . getroot ( )