
    G@d	                     >    d Z ddlZddlmZ ddlmZ g dZd Zd ZdS )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         }|                    |            n# t          $ r g cY S  | gcY S xY w|S )z$Get all submodules of a given modulec                     d S )N )modules    Llib/python3.11/site-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      sOOU
'
AJ4D(8: : 	' 	'BeGg&&&&	'    			us   AA A1+A1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   ss     !&&L |,,Jz!!,''J   ##g

)J|r7   )	__doc__r;   picklesharer   spyder.config.baser   rJ   rG   rM   r3   r7   r5   <module>rQ      sx      % % % % % % , , , , , ,	+ 	+ 	+   (    r7   