22import sys
33import traceback
44from inspect import getframeinfo
5+ from pathlib import Path
56
67from qtpy .QtWidgets import QA
8000
pplication
78import larray as la
@@ -125,7 +126,7 @@ def _edit_dialog(parent, obj=None, title='', minvalue=None, maxvalue=None, reado
125126 if not title and obj is not REOPEN_LAST_FILE :
126127 title = _get_title (obj , depth = depth + 1 )
127128
128- if obj is REOPEN_LAST_FILE or isinstance (obj , (str , la .Session )):
129+ if obj is REOPEN_LAST_FILE or isinstance (obj , (str , Path , la .Session )):
129130 dlg = MappingEditor (parent )
130131 assert minvalue is None and maxvalue is None
131132 setup_ok = dlg .setup_and_check (obj , title = title , readonly = readonly , caller_info = caller_info ,
@@ -147,8 +148,8 @@ def edit(obj=None, title='', minvalue=None, maxvalue=None, readonly=False, depth
147148
148149 Parameters
149150 ----------
150- obj : np.ndarray, Array, Session, dict, str, REOPEN_LAST_FILE or None, optional
151- Object to visualize. If string, array(s) will be loaded from the file given as argument.
151+ obj : np.ndarray, Array, Session, dict, str, Path, REOPEN_LAST_FILE or None, optional
152+ Object to visualize. If string or Path , array(s) will be loaded from the file given as argument.
152153 Passing the constant REOPEN_LAST_FILE loads the last opened file.
153154 Defaults to None, which gathers all variables (global and local) where the function was called.
154155 title : str, optional
@@ -190,8 +191,8 @@ def view(obj=None, title='', depth=0, display_caller_info=True, add_larray_funct
190191
191192 Parameters
192193 ----------
193- obj : np.ndarray, Array, Session, dict or str , optional
194- Object to visualize. If string, array(s) will be loaded from the file given as argument.
194+ obj : np.ndarray, Array, Session, dict, str or Path , optional
195+ Object to visualize. If string or Path , array(s) will be loaded from the file given as argument.
195196 Defaults to the collection of all local variables where the function was called.
196197 title : str, optional
197198 Title for the current object. Defaults to the name of the first object found in the caller namespace which
0 commit comments