Package psychopy :: Module gui
[frames] | no frames]

Module gui

source code

To build simple dialogues etc. (requires wxPython)
Classes
  Dlg
A simple dialogue box.
  DlgFromDict
Creates a dialogue box that represents a dictionary of values.
Functions
 
fileSaveDlg(initFilePath='', initFileName='', prompt='Select file to save', allowed=None)
A simple dialogue allowing access to the file system.
source code
 
fileOpenDlg(tryFilePath='', tryFileName='', prompt='Select file to open', allowed=None)
A simple dialogue allowing access to the file system.
source code
Variables
  OK = 5100
Function Details

fileSaveDlg(initFilePath='', initFileName='', prompt='Select file to save', allowed=None)

source code 

A simple dialogue allowing access to the file system. (Useful in case you collect an hour of data and then try to save to a non-existent directory!!)

If initFilePath or initFileName are empty or invalid then current path and empty names are used to start search.

If user cancels the None is returned.

Parameters:
  • initFilePath, string - default file path on which to open the dialog
  • initFilePath, string - default file name, as suggested file
  • prompt, string, (default, "Select, file, to, open") - can be set to custom prompts
  • allowed, string - a string to specify file filters. e.g. "BMP files (.bmp)|.bmp|GIF files (.gif)|.gif" See http://www.wxpython.org/docs/api/wx.FileDialog-class.html for further details

fileOpenDlg(tryFilePath='', tryFileName='', prompt='Select file to open', allowed=None)

source code 

A simple dialogue allowing access to the file system. (Useful in case you collect an hour of data and then try to save to a non-existent directory!!)

If tryFilePath or tryFileName are empty or invalid then current path and empty names are used to start search.

If user cancels, then None is returned.

Parameters:
  • tryFilePath, string - default file path on which to open the dialog
  • tryFilePath, string - default file name, as suggested file
  • prompt, string, (default, "Select, file, to, open") - can be set to custom prompts
  • allowed, string - a string to specify file filters. e.g. "BMP files (.bmp)|.bmp|GIF files (.gif)|.gif" See http://www.wxpython.org/docs/api/wx.FileDialog-class.html for further details