Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork7.9k
Description
importmatplotlibprint"\n".join(dir(matplotlib))
yields
RcParamsVerbose__builtins____doc____file____name____package____path____version____version__numpy___create_tmp_config_dir_deprecated_ignore_map_deprecated_map_get_configdir_get_data_path_get_data_path_cached_get_home_havedate_is_writable_dir_python24_required_use_error_msgasciibyte2strcbookcheckdep_dvipngcheckdep_ghostscriptcheckdep_inkscapecheckdep_pdftopscheckdep_ps_distillercheckdep_texcheckdep_usetexcheckdep_xmllintcolorscompare_versionscompatconverterdateutildefaultdefaultParamsdefault_test_modulesdistutilsexpected_versionfontconfig_patternfound_versionget_backendget_configdirget_data_pathget_example_dataget_homeget_py2exe_datafilesinteractiveis_interactiveis_string_likekeymajormatplotlib_fnameminor1minor2numpyosprint_functionpyparsingrcrcParamsrcParamsDefaultrcParamsOrigrc_contextrc_filerc_file_defaultsrc_paramsrc_params_from_filercdefaultsrcsetupresshutilsubprocesssystempfiletesttk_window_focustmpusevalidate_backendvalidate_toolbarverbosewarningsx
This is a mess; from the user's standpoint there are some useful things in there, but they are hard to identify among all the detritus from the startup process. And then there is the bewildering rc conglomeration. Maybe that should be treated separately.
I'm not sure whether cleaning this up requires one or more MEPs, but it probably does require some strategic thinking, so I am starting this with a MEP tag.
As a first shot, maybe all that is required is a bunch ofdel
commands sprinkled throughoutinit.py. Or, every variable and module that needs to be deleted could be given a unique prefix, or added to a list, and then all could be deleted at the end.
Alternatively, leading underscores could be used aggressively so that at least when using ipython tab completion, only names that are intended to be part of the public API would appear.