ENLIGHTEN
Cross-platform desktop GUI for Wasatch Photonics spectrometers
Loading...
Searching...
No Matches
util.py File Reference

Namespaces

namespace  enlighten
 
namespace  enlighten.util
 

Functions

 enlighten.util._json_object_hook (d)
 
 enlighten.util.add_combobox_item (combobox, name)
 
 enlighten.util.apply_min_max (widget)
 
 enlighten.util.clean_json (s)
 Assuming JSON has been rendered with indentation, leave the dicts indented but flatten arrays to single lines.
 
 enlighten.util.clean_list (a)
 
 enlighten.util.decr_spinbox (spinbox)
 
str enlighten.util.determine_encoding (str pathname)
 
 enlighten.util.find_file (filename, dirs)
 File Helpers.
 
 enlighten.util.force_size (widget, width, height)
 
 enlighten.util.get_bullet ()
 
 enlighten.util.get_combobox_item_index (combobox, name)
 
 enlighten.util.incr_spinbox (spinbox)
 
 enlighten.util.is_today (mon, day, year=None)
 Date/Time Helpers.
 
 enlighten.util.join_valid (delim, tokens)
 String Helpers.
 
 enlighten.util.json2obj (text)
 JSON helpers.
 
 enlighten.util.normalize_decimal (obj)
 Recurse down a potentially nested structure of dicts and lists, converting every Decimal into a float.
 
 enlighten.util.normalize_filename (filename)
 Some filenames are auto-populated from the on-screen labels used on thumbnails and graph traces.
 
 enlighten.util.normalize_history (x, hi=65535.0)
 Qt Helpers.
 
 enlighten.util.pluralize (count, singular, plural)
 
 enlighten.util.pluralize_spectra (count)
 This made Chris Paul happy.
 
str enlighten.util.printable (str s)
 bang (!) through tilde (~)
 
 enlighten.util.python_version ()
 
 enlighten.util.remove_combobox_item (combobox, name)
 
 enlighten.util.safe_mkdirp (directory)
 create a directory tree, optionally requiring user expansion (~), without throwing exceptions
 
 enlighten.util.set_checkbox_quietly (cb, flag)
 
 enlighten.util.set_enabled (w, flag, tooltip=None)
 Enable or disable a QWidget, while simultaneous restoring or clearing its QToolTip.
 
 enlighten.util.set_min_max (widget, lo, hi, value=None)
 
 enlighten.util.set_table_row_color (table, row, color)
 should be e.g.
 
 enlighten.util.sets_intersect (s1, s2, case_insensitive=False)
 
 enlighten.util.undent (s)
 
 enlighten.util.unwrap (s)
 

Variables

 enlighten.util.log = logging.getLogger(__name__)