def getMiindPythonPath(): return os.path.join(directories3.miind_root(), 'python')
#import matplotlib #matplotlib.use('Agg') import argparse import codegen3 import sys import glob import os import os.path as op import miind_api as api import matplotlib.pyplot as plt import directories3 cwdfilename = 'miind_cwd' settingsfilename = op.expanduser('~/.miind_settings') available_settingsfilename = os.path.join(directories3.miind_root(),'python','miind_settings') debug = False settings = {} available_settings = {} def getMiindPythonPath(): return os.path.join(directories3.miind_root(), 'python') def _help(command): command_name = command[0] name = 'help' alts = ['h', '?', 'commands', 'list'] if command_name in [name] + alts: print('') print('MIIND UI')
def getMiindBuildPath(): return os.path.join(directories.miind_root(), 'build')
def getMiindAppsPath(): build_path = getMiindBuildPath() # if miind has been installed, important apps are in ../share/miind/apps if not os.path.isdir(build_path): build_path = directories.miind_root() return op.join(build_path, 'apps')
def __init__(self, newPath): self.newPath = os.path.expanduser(newPath) def __enter__(self): self.savedPath = os.getcwd() os.chdir(self.newPath) def __exit__(self, etype, value, traceback): os.chdir(self.savedPath) if __name__ == "__main__": # always copy sub.sh to the calling directory, unless it's already there # this gives the user the opportunity to adapt sub.sh to the local queueing system subpath = os.path.join(directories.miind_root(), 'python') # either there are two arguments if len(sys.argv) == 1 or len(sys.argv) > 4: print( 'Either a single argument containing the local submission directory, which is where the executable will be run, or' ) print( 'two arguments, which forces queue submission, where the second is the directory where submit.py is called from, or ' ) print( 'three arguments with the third argument a local filename containing and alternative script for sub.sh' ) sys.exit() dir = sys.argv[1]