Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
'-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()
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()
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()
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()