#NEWLINE# def _split_multipath( pathstr ) : #NEWLINE# #INDENT# 'Appropriately splits an SVG path with multiple sub-paths.\n    ' #NEWLINE# if ( not ( pathstr [ 0 ] in [ 'm' , 'M' ] ) ) : #NEWLINE# #INDENT# raise ValueError ( ( 'Bad path format: %s' % headers ) ) #NEWLINE# #UNINDENT# import re #NEWLINE# subpaths = [ sp for sp in re . split ( '[Mm]' , pathstr ) if ( len ( sp ) > 0 ) ] #NEWLINE# headers = re . findall ( '[Mm]' , pathstr ) #NEWLINE# for ( subpath , header ) in zip ( subpaths , headers ) : #NEWLINE# #INDENT# ( yield ( header + subpath ) . strip ( ) )