Changeset View
Changeset View
Standalone View
Standalone View
release/scripts/templates_py/background_job.py
| Show First 20 Lines • Show All 89 Lines • ▼ Show 20 Lines | parser.add_argument( | ||||
| "-s", "--save", dest="save_path", metavar='FILE', | "-s", "--save", dest="save_path", metavar='FILE', | ||||
| help="Save the generated file to the specified path", | help="Save the generated file to the specified path", | ||||
| ) | ) | ||||
| parser.add_argument( | parser.add_argument( | ||||
| "-r", "--render", dest="render_path", metavar='FILE', | "-r", "--render", dest="render_path", metavar='FILE', | ||||
| help="Render an image to the specified path", | help="Render an image to the specified path", | ||||
| ) | ) | ||||
| args = parser.parse_args(argv) # In this example we wont use the args | args = parser.parse_args(argv) # In this example we won't use the args | ||||
| if not argv: | if not argv: | ||||
| parser.print_help() | parser.print_help() | ||||
| return | return | ||||
| if not args.text: | if not args.text: | ||||
| print("Error: --text=\"some string\" argument not given, aborting.") | print("Error: --text=\"some string\" argument not given, aborting.") | ||||
| parser.print_help() | parser.print_help() | ||||
| Show All 10 Lines | |||||