Skip to content

Preferences

russ_hensel edited this page Dec 29, 2025 · 7 revisions

A large amount of application behavior is managed through preferences stored as parameters in parameters.py The basic idea is simple: we have a global singleton that has instance variables which are then use elsewhere in the program.

we will briefly discuss two aspects of this:

  • some useful parameters or groups of parameters
  • some complications in the object

Some useful parameters or groups of parameters As usual in the application you should read the code, only the highest level explanation is in this Wiki. We hope that parameters.py is well enough documented that you can figure it out. In some cases you might want to take an instance variable name and search the code.

  • Variables that control what tabs you see:

    • dir_for_tabs -- tab code in these directories are discovered when the app launches.
    • min_complete -- controls part of tab discovery
    • default_search -- fills in key_words when app launches. Mostly for debugging
    • do_search_on_init = True
  • Logging

    • self.logging_level = logging.INFO

    • pylogging_fn file name for the python logging

    • log_mode controls if you get a new log on each startup

    • logger_id an id in the log file

  • Application appearance

    • qt_width controls size of app

    • qt_height

    • ...

    • wat_qt_width controls size of wat inspector

    • wat_qt_height 0

    • ...

  • External Editor

    • text_editor name of system editor

Some complications in the object

  • choose_mode() at top because may be changed often by user -- chooses a mode for the application

  • mode_default() sets up a default mode that should minimally work for everyone ( on linux ). It's values may be overwritten by modes you invoke in choose_mode() Read this code for more doc on what the parameters do.

  • mode_new_user() a mode that a new user may want to customize for them selves.

  • init() at bottom of file because generally should not be changed

  • there is more i should document

Clone this wiki locally