ADEPYF(1) General Commands Manual ADEPYF(1)
NAME
adepyf - call an ADE Python function
SYNOPSIS
adepyf [ -V | --version ] [ -v | --verbose | -d level | --debug=level ]
[ -h | --help ] [ -p | --paths ] [ -n | --simulate ] code
DESCRIPTION
Adepyf provides a command line interface to the ADE Python library.
code should return.
CONFIGURATION
None.
OPTIONS
-d level, --debug=level Determines how verbose this program will be.
The message types displayed for the different
values of level are as follows: 0 displays no
messages; 1 displays only errors, 2 displays
errors and warnings; 3 displays errors, warn-
ings and informational messages; higher values
display errors, warnings, informational mes-
sages and various messages intended for debug-
ging. The default is 2.
-h, --help Displays a brief usage message.
-p, --paths Lists the compiled-in paths of various files
and directories that this program uses. -n,
--simulate Some external commands that this
program runs may be displayed rather than ac-
tually executed. BEWARE: different programs
implement different levels of simulation; so
this option may work perfectly; on the other
hand it may do nothing at all!
-v, --verbose Equivalent to -d 3.
-V, --version Prints the program's version number and exits.
EXIT STATUS
On success adepyf returns zero. On failure it returns non-zero and dis-
plays a diagnostic message.
FILES
None.
ENVIRONMENT VARIABLES
None.
EXAMPLES
This shows how to call ADE functions (in this case to create a lock
file and then remove it), handle their return codes and illustrates how
to return from the code:
adepyf 'import time; import ade; rc=ade.lck_lock(errstack, "/tmp/x.lock"); return rc if rc != ade.ok else [ print(time.strftime("%Y-%m-%d %H:%M:%S")), time.sleep(10), print(time.strftime("%Y-%m-%d %H:%M:%S")), ade.lck_unlock(errstack, "/tmp/x.lock")ade.ok ][-1]'
See also CAVEATS below.
CAVEATS
Python uses indentation to group control-flow; therefore code may need
to convoluted. As such, adepyf is not terribly useful.
STANDARDS
This manual page documents version ADE_APP_TOKEN_RELEASE_ID of adepyf.
SEE ALSO
adeperlf(1), adeshf(1), ade-config(1)
AUTHOR
ADE_APP_TOKEN_AUTHOR_NAME <ADE_APP_TOKEN_AUTHOR_EMAIL>
COPYRIGHT & DISTRIBUTION POLICY
Copyright (C) 2003-ADE_APP_TOKEN_RELEASE_YEAR ADE_APP_TOKEN_AUTHOR_NAME
This program is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
Free Software Foundation; either version 2 of the License, or (at your
option) any later version.
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of MER-
CHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
Public License for more details.
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
675 Mass Ave, Cambridge, MA 02139, USA.
ADE_APP_TOKEN_RELEASE_DATE_MAN ADEPYF(1)