Notebook

Tools for setting up and interacting with IPython notebooks.

pyneurotrace.notebook.filePicker(prompt='Select file', extension='', defaultPath='.')

Show a dialog selection box to the user to pick one file.

Parameters:
  • prompt (str, optional) – The prompt message for the dialog. Default is “Select file”.

  • extension (str, optional) – File extension filter. Default is “”.

  • defaultPath (str, optional) – Default path to start the file picker. Default is ‘.’.

Returns:

fname – Path of the selected file.

Return type:

str

pyneurotrace.notebook.newFilePicker(prompt='New file', defaultPath='.')

Show a dialog for the user to select the path of a new save file.

Parameters:
  • prompt (str, optional) – The prompt message for the dialog. Default is “New file”.

  • defaultPath (str, optional) – Default path to start the file picker. Default is ‘.’.

Returns:

fname – Path of the new save file.

Return type:

str

pyneurotrace.notebook.folderPicker(prompt='Output Folder', defaultPath='.')

Show a folder selection dialog to the user and return the path.

Parameters:
  • prompt (str, optional) – The prompt message for the dialog. Default is “Output Folder”.

  • defaultPath (str, optional) – Default path to start the folder picker. Default is ‘.’.

Returns:

fname – Path of the selected folder.

Return type:

str

pyneurotrace.notebook.showTabs(data, showOnTabFunc, titles=None, progressBar=False)

Display data in multiple tabs in the same output area.

Parameters:
  • data (list or dict) – Data to be displayed in tabs.

  • showOnTabFunc (function) – Function to display data on each tab.

  • titles (list, optional) – List of titles for the tabs. Default is None.

  • progressBar (bool, optional) – Flag to show a progress bar. Default is False.

Returns:

Displays data in tabs within the notebook.

Return type:

None