• Language: en

popy_check

When developing a PoPy script file it is sometimes useful to sanity check the input and automatically detect common errors.

Note this checking process also happens when using popy_run, however the popy_check enables you to check before you are ready to run a script.

Checking a script

Check a script by opening a Open a PoPy Command Prompt and typing:-

$ popy_check my_script.pyml

Note a common switch to use with popy_check is:-

$ popy_check -o my_script.pyml

Here the ‘-o’ option overwrites previous output automatically. If the script has already been run and you do not use the ‘-o’ option, you will be asked to confirm you want to overwrite any previous output.

For other command line options see Command line options.

Checking multiple scripts

Note you can also check all scripts in a directory using:-

$ popy_check *.pyml

This checks all files with the ‘.pyml’ extension in serial.

Log files created by popy_check

When popy_check processes a script file, it creates a log file:-

my_script.pyml.check.log

Hopefully the various error and warning messages will enable you to more easily edit and fix a broken script file.

Command line options

Note: "popy_check ..." will be deprecated in favour of "popy check ..." from v1.3

usage: popy_check [-h] [-o] input_file

Checks PoPy script for consistency and returns errors + warnings. Can use
optionally prior to running script.

positional arguments:
  input_file       Required path to input configuration file.

optional arguments:
  -h, --help       show this help message and exit
  -o, --overwrite  Optionally overwrite existing output files without asking.
Back to Top