
    Je	                     <    d Z ddlZddlmZ ddlmZ g dZd Zd Zy)z(
Module completion auxiliary functions.
    N)PickleShareDB)get_conf_path)-numpyscipysympypandasnetworkxstatsmodels
matplotlibsklearnskimagempmathospillowOpenGLarrayaudioopbinasciicPickle	cStringIOcmathcollectionsdatetimeerrno
exceptionsgc	importlib	itertoolsmathmmapmsvcrtntoperatorastsignalsys	threadingtimewx	zipimportzlibpytestPyQt4PyQt5PySidePySide2zos.pathc                     d }	 t        |       }| g}t        j                  |j                  |j                  dz   |      }|D ]  }|d   }|j                  |        	 |S # t        $ r g cY S  | gcY S xY w)z$Get all submodules of a given modulec                      y )N )modules    N/usr/lib/python3/dist-packages/spyder/utils/introspection/module_completion.pycatch_exceptionsz(get_submodules.<locals>.catch_exceptions$   s        .   )
__import__pkgutilwalk_packages__path____name__appendImportError)modr6   m
submodulessubmodssmsm_names          r5   get_submodulesrG   "   s    sOU
''

AJJ4D(8: 	'BeGg&	'   	us   AA! !A4.A4c                      t        d      } t        |       }d|v r|d   S g }t        D ]  }t        |      }||z  } ||d<   |S )zZ
    Get all submodules of the main scientific modules and others of our
    interest
    dbrC   )r   r   PREFERRED_MODULESrG   )modules_path
modules_dbrC   rB   rD   s        r5   get_preferred_submodulesrM   6   sg     !&L |,Jz!,''J  #g
  *J|r7   )	__doc__r;   picklesharer   spyder.config.baser   rJ   rG   rM   r3   r7   r5   <module>rQ      s'     % ,	+ (r7   