sidpy.io.interface_utils.open_file_dialog

class sidpy.io.interface_utils.open_file_dialog(dir_name='.', extension=['*'])[source]

Bases: object

Widget to select directories or widgets from a list

Works in google colab. The widget converts the name of the nion file to the one in Nion’s swift software, because it is otherwise incomprehensible

dir_name

name of starting directory

Type:

str

extension

extensions of files to be listed in widget

Type:

list of str

get_directory()[source]
set_options()[source]
get_file_name()[source]

Example

>>from google.colab import drive >>drive.mount(“/content/drive”) >>file_list = pyTEMlib.file_tools.FileWidget() next code cell: >>dataset = pyTEMlib.file_tools.open_file(file_list.file_name)

Methods

get_directory

get_file_name

set_options