class_docstr: View / controller for the preferences that get displayed in the main window
  
      
class_docstr_tok: ["View","\/","controller","for","the","preferences","that","get","displayed","in","the","main","window"]
code: def close(self):
      remove_image_directory_listener(
          self.__on_preferences_image_directory_event
      )
      remove_output_directory_listener(
          self.__on_preferences_output_directory_event
      )
  
imports: import os
  import wx
  from cellprofiler_core.analysis import use_analysis
  from cellprofiler_core.preferences import DEFAULT_IMAGE_DIRECTORY
  from cellprofiler_core.preferences import DEFAULT_IMAGE_FOLDER_HELP
  from cellprofiler_core.preferences import DEFAULT_OUTPUT_DIRECTORY
  from cellprofiler_core.preferences import DEFAULT_OUTPUT_FOLDER_HELP
  from cellprofiler_core.preferences import add_image_directory_listener
  from cellprofiler_core.preferences import add_output_directory_listener
  from cellprofiler_core.preferences import add_progress_callback
  from cellprofiler_core.preferences import fire_image_directory_changed_event
  from cellprofiler_core.preferences import get_default_image_directory
  from cellprofiler_core.preferences import get_default_output_directory
  from cellprofiler_core.preferences import get_recent_files
  from cellprofiler_core.preferences import remove_image_directory_listener
  from cellprofiler_core.preferences import remove_output_directory_listener
  from cellprofiler_core.preferences import set_default_image_directory
  from cellprofiler_core.preferences import set_default_output_directory
  from cellprofiler_core.preferences import set_pixel_size
  from ._progress_watcher import ProgressWatcher
  from ..constants.preferences_view import WELCOME_MESSAGE
  from ..html.utils import rst_to_html_fragment
  from ..htmldialog import HTMLDialog
  from ..utilities.preferences_view import secs_to_timestr
label_desc: Use image node_id 5 for calling the PreferencesView obj's underlying member method code with example usage: obj.close() without return types