Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
# box from automatically triggering a new event.
self._pathlist.unobserve(
self._on_pathlist_select,
names='value'
)
self._dircontent.unobserve(
self._on_dircontent_select,
names='value'
)
self._filename.unobserve(
self._on_filename_change,
names='value'
)
# Set form values
self._pathlist.options = get_subpaths(path)
self._pathlist.value = path
self._filename.value = filename
# file/folder real names
dircontent_real_names = get_dir_contents(
path,
hidden=self._show_hidden,
prepend_icons=False
)
# file/folder display names
dircontent_display_names = get_dir_contents(
path,
hidden=self._show_hidden,
prepend_icons=self._use_dir_icons
)