def mimedata2url(source, extlist=None):
 pathlist = []
 if source.hasUrls():
  for url in source.urls():
   path = _process_mime_path(to_text_string(url.toString()), extlist)
   if (path is not None):
    pathlist.append(path)
 elif source.hasText():
  for rawpath in to_text_string(source.text()).splitlines():
   path = _process_mime_path(rawpath, extlist)
   if (path is not None):
    pathlist.append(path)
 if pathlist:
  return pathlist

def mimedata2url ( source , extlist = None ) : pathlist = [ ] if source . hasUrls ( ) : for url in source . urls ( ) : path = _process_mime_path ( to_text_string ( url . toString ( ) ) , extlist ) if ( path is not None ) : pathlist . append ( path ) elif source . hasText ( ) : for rawpath in to_text_string ( source . text ( ) ) . splitlines ( ) : path = _process_mime_path ( rawpath , extlist ) if ( path is not None ) : pathlist . append ( path ) if pathlist : return pathlist
extract url list from mime data extlist: for example .