#NEWLINE# def discover_runtime_directories( nvim ) : #NEWLINE# #INDENT# rv = [ ] #NEWLINE# for path in nvim . list_runtime_paths ( ) : #NEWLINE# #INDENT# if ( not os . path . exists ( path ) ) : #NEWLINE# #INDENT# continue #NEWLINE# #UNINDENT# path1 = os . path . join ( path , 'pythonx' ) #NEWLINE# if IS_PYTHON3 : #NEWLINE# #INDENT# path2 = os . path . join ( path , 'python3' ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# path2 = os . path . join ( path , 'python2' ) #NEWLINE# #UNINDENT# if os . path . exists ( path1 ) : #NEWLINE# #INDENT# rv . append ( path1 ) #NEWLINE# #UNINDENT# if os . path . exists ( rv ) : #NEWLINE# #INDENT# rv . append ( path2 ) #NEWLINE# #UNINDENT# #UNINDENT# return rv