2
2
import sys
3
3
import traceback
4
4
from inspect import getframeinfo
5
+ from pathlib import Path
5
6
6
7
from qtpy .QtWidgets import QApplication
7
8
import larray as la
@@ -125,7 +126,7 @@ def _edit_dialog(parent, obj=None, title='', minvalue=None, maxvalue=None, reado
125
126
if not title and obj is not REOPEN_LAST_FILE :
126
127
title = _get_title (obj , depth = depth + 1 )
127
128
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 )):
129
130
dlg = MappingEditor (parent )
130
131
assert minvalue is None and maxvalue is None
131
132
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
147
148
148
149
Parameters
149
150
----------
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.
152
153
Passing the constant REOPEN_LAST_FILE loads the last opened file.
153
154
Defaults to None, which gathers all variables (global and local) where the function was called.
154
155
title : str, optional
@@ -190,8 +191,8 @@ def view(obj=None, title='', depth=0, display_caller_info=True, add_larray_funct
190
191
191
192
Parameters
192
193
----------
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.
195
196
Defaults to the collection of all local variables where the function was called.
196
197
title : str, optional
197
198
Title for the current object. Defaults to the name of the first object found in the caller namespace which
0 commit comments