8.6.8.8. pymodaq_gui.utils.layout module
- pymodaq_gui.utils.layout.load_layout_state(dockarea, file=None, user=False)[source]
Load and restore a dockarea layout state from the select_file obtained pathname file.
- pymodaq_gui.utils.layout.migrate_layout_file(source, destination=None)[source]
Write a copy of a layout file written by an older version (a pickle) as a json file
The source file is never modified, and an existing destination file is never overwritten.
- Returns:
Path
- Return type:
- Raises:
FileExistsError – if the destination exists
UnsafePickleError – if the file contains anything else than plain data, in this case nothing is written
- pymodaq_gui.utils.layout.read_layout_file(file)[source]
Read the dockarea state stored in a layout file
New files are json. Files written by older versions are pickles (they start with the 0x80 protocol byte): these are read by a restricted loader that only rebuilds plain data and never runs code.
- Return type: