.\" Copyright (C) 1994-2018 Altair Engineering, Inc.
.\" For more information, contact Altair at www.altair.com.
.\"
.\" This file is part of the PBS Professional ("PBS Pro") software.
.\"
.\" Open Source License Information:
.\"
.\" PBS Pro is free software. You can redistribute it and/or modify it under the
.\" terms of the GNU Affero General Public License as published by the Free
.\" Software Foundation, either version 3 of the License, or (at your option) any
.\" later version.
.\"
.\" PBS Pro is distributed in the hope that it will be useful, but WITHOUT ANY
.\" WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
.\" FOR A PARTICULAR PURPOSE.
.\" See the GNU Affero General Public License for more details.
.\"
.\" You should have received a copy of the GNU Affero General Public License
.\" along with this program. If not, see .
.\"
.\" Commercial License Information:
.\"
.\" For a copy of the commercial license terms and conditions,
.\" go to: (http://www.pbspro.com/UserArea/agreement.html)
.\" or contact the Altair Legal Department.
.\"
.\" Altair’s dual-license business model allows companies, individuals, and
.\" organizations to create proprietary derivative works of PBS Pro and
.\" distribute them - whether embedded or bundled with other software -
.\" under a commercial license agreement.
.\"
.\" Use of Altair’s trademarks, including but not limited to "PBS™",
.\" "PBS Professional®", and "PBS Pro™" and Altair’s logos is subject to Altair's
.\" trademark licensing policies.
.\"
.TH pbs_python 1B "23 October 2017" Local "PBS Professional"
.SH NAME
.B pbs_python
\- Python interpreter for debugging a hook script from the command line
.SH SYNOPSIS
.B pbs_python
--hook [-e ] [-i ]
.RS 11
[-L ] [-l ] [-o ]
.br
[-r ] [-s ] []
.RE
.B pbs_python
.B pbs_python
--version
.SH DESCRIPTION
The PBS Python interpreter,
.B pbs_python,
is a wrapper for Python.
You can use the
.B pbs_python
wrapper that is shipped with PBS to debug hooks. Either:
.RS 5
Use the
.I --hook
option to
.B pbs_python
to run
.B pbs_python
as a wrapper to Python, employing the
.B pbs_python
options. With the
.I --hook
option, you cannot use the standard Python options. The rest of this
man page covers how to use
.B pbs_python
with the
.I --hook
option.
Do not use the
.I --hook
option, so
.B pbs_python
runs the Python interpreter, with the standard Python options, and without access to
the
.B pbs_python
options.
.RE
.B Debugging Hooks
.br
You can get each hook to write out debugging files, and then modify the files
and use them as debugging input to
.B pbs_python.
Alternatively, you can write them yourself.
Debugging files can contain information about the event, about the site, and
about what the hook changed. You can use these as inputs to a hook when debugging.
For a complete description of using
.B pbs_python
with debugging files, see "Debugging Hooks" in the PBS Professional Hooks Guide.
.SH Options to pbs_python
.IP "--hook" 6
This option is a switch. When you use this option, you can use the
PBS Python module (via "import pbs"), and the other options described
here are available. When you use this option, you cannot use the
standard Python options. This option is useful for debugging.
When you do not use this option, you cannot use
the other options listed here, but you can use the standard
Python options.
.IP "-e " 6
Sets the mask that determines which event types are logged by
.B pbs_python.
To see only debug messages, set the value to 0xd80. To
see all messages, set the value to 0xffff.
.br
The
.B pbs_python
interpreter uses the same set of mask values that are
used for the
.I $logevent
entry in the
.B pbs_mom
configuration file.
See the pbs_mom.8B man page. Available only when
.I --hook
option is used.
.IP "-i " 6
Text file containing data to populate pbs.event() objects.
Each line specifies an attribute value or a resource value. Syntax of
each input line is one of the following:
.RS 10