How to use the psiturk.psiturk_shell.run function in PsiTurk

To help you get started, we’ve selected a few PsiTurk 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 NYUCCL / psiTurk / psiturk / command_line.py View on Github external
'-s', '--script', help='Run commands from a script file'
    )
    script_group.add_argument(
        '-e', '--execute', help='Execute one command specified on the command line'
    )
    script_group.add_argument(
        '-t', '--test', help='Run cmd2 unittest using provided file'
    )
    args, unknownargs = parser.parse_known_args()
    # If requested version just print and quit
    if args.version:
        print(version_number)
    else:
        import psiturk.psiturk_shell as ps
        if args.script:
            ps.run(script=args.script, quiet=True)
        elif args.test:
            ps.run(testfile=args.test, quiet=True)
        elif args.execute or unknownargs:
            if unknownargs:
                execute = ' '.join(unknownargs)
            else:
                execute = args.execute
            ps.run(execute=execute, quiet=True)
        else:
            ps.run()
github NYUCCL / psiTurk / psiturk / command_line.py View on Github external
args, unknownargs = parser.parse_known_args()
    # If requested version just print and quit
    if args.version:
        print(version_number)
    else:
        import psiturk.psiturk_shell as ps
        if args.script:
            ps.run(script=args.script, quiet=True)
        elif args.test:
            ps.run(testfile=args.test, quiet=True)
        elif args.execute or unknownargs:
            if unknownargs:
                execute = ' '.join(unknownargs)
            else:
                execute = args.execute
            ps.run(execute=execute, quiet=True)
        else:
            ps.run()
github NYUCCL / psiTurk / psiturk / command_line.py View on Github external
if args.version:
        print(version_number)
    else:
        import psiturk.psiturk_shell as ps
        if args.script:
            ps.run(script=args.script, quiet=True)
        elif args.test:
            ps.run(testfile=args.test, quiet=True)
        elif args.execute or unknownargs:
            if unknownargs:
                execute = ' '.join(unknownargs)
            else:
                execute = args.execute
            ps.run(execute=execute, quiet=True)
        else:
            ps.run()
github NYUCCL / psiTurk / psiturk / command_line.py View on Github external
script_group.add_argument(
        '-e', '--execute', help='Execute one command specified on the command line'
    )
    script_group.add_argument(
        '-t', '--test', help='Run cmd2 unittest using provided file'
    )
    args, unknownargs = parser.parse_known_args()
    # If requested version just print and quit
    if args.version:
        print(version_number)
    else:
        import psiturk.psiturk_shell as ps
        if args.script:
            ps.run(script=args.script, quiet=True)
        elif args.test:
            ps.run(testfile=args.test, quiet=True)
        elif args.execute or unknownargs:
            if unknownargs:
                execute = ' '.join(unknownargs)
            else:
                execute = args.execute
            ps.run(execute=execute, quiet=True)
        else:
            ps.run()