sidpy.io.interface_utils.FileWidget

class sidpy.io.interface_utils.FileWidget(dir_name='.', extension=['*'], sum_frames=False)[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_dir

set_options

update_directory_list

Update the list of files in the current directory Cam be overwritten in child class

update_directory_list(directory_name)[source]

Update the list of files in the current directory Cam be overwritten in child class