How to use the ipython.jobfolder_file_completer function in ipython

To help you get started, we’ve selected a few ipython examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github pylada / pylada-light / ipython / View on Github external
has_expr = True
        results = ["--file", "--expression"]

    results.extend(["errors", "results", "running", "all"])
    if len(data) == 0:
        data = ['']
    elif event.line[-1] == ' ':
    if not has_file:
        results.extend(name for name, u in self.user_ns.items()
                       if isinstance(u, JobFolder)
                       and name[0] != '_'
                       and name not in data)
    if not has_expr:
    return list(results)
github pylada / pylada-light / ipython / launch / View on Github external
def completer(self, event, data):
    """ Completer for scattered launcher. """
    from .. import jobfolder_file_completer
    if data[-1] == "--kwargs":
        return [u for u in self.user_ns if u[0] != '_' and isinstance(self.user_ns[u], dict)]
    elif data[-1] == "--nbprocs":
        return ['']
    elif data[-1] == "--ppn":
        return ['']
    result = ['--force', '--kwargs', '--help', '--nbprocs', '--ppn']
    result = list(set(result) - set(data))
    return result
github pylada / pylada-light / ipython / launch / View on Github external
elif data[-1] == "--queue":
            return queues
        elif data[-1] == "--account":
            return accounts
        elif data[-1] == "--feature":
            return features
    result = ['--force', '--walltime', '--nbprocs', '--help']
    if len(queues) > 0:
    if len(accounts) > 0:
    if len(features) > 0:
    if debug_queue is not None:
    result = list(set(result) - set(data))
    return result