neurotools.util.system module

neurotools.util.system.execfile(filepath, globals=None, locals=None)[source]

http://stackoverflow.com/questions/ 436198/what-is-an-alternative-to-execfile-in-python-3

Note: this doesn’t seem to work with ipython notebooks

neurotools.util.system.query_yes_no(question, default='yes')[source]

Ask a yes/no question via raw_input() and return their answer. https://stackoverflow.com/questions/3041986/apt-command-line-interface-like-yes-no-input

Parameters:
  • question (string) – is a string that is presented to the user.

  • default (string) – is the presumed answer if the user just hits <Enter>. It must be “yes” (the default), “no” or None (meaning an answer is required of the user).

Returns:

The “answer” return value is True for “yes” or False for “no”.

Return type:

string