.\" $HeadURL$ $LastChangedRevision$ .\" .pso ade-config --format=man .so \*[ade_include_prefix]/ade.man .TH ADEPYTHONF 1 "ADE_APP_TOKEN_RELEASE_DATE_MAN" .ne 5 .SH NAME adepyf \- call an ADE Python function .br .ne 5 .SH SYNOPSIS .B adepyf \*[ade_standard_synopsis_component] .I function [ .I arguments \fR ... ] .br .ne 5 .SH DESCRIPTION .B Adepyf provides a command line interface to the ADE Python library. .br .ne 5 .SH CONFIGURATION None. .ne 5 .SH OPTIONS \*[ade_standard_options_component] .br .ne 5 .SH EXIT STATUS On success .B adepyf returns zero. On failure it returns non-zero and displays a diagnostic message. .br .ne 5 .SH FILES None. .br .ne 5 .SH ENVIRONMENT VARIABLES None. .br .ne 5 .SH EXAMPLES This first example shows what happens when an unknown function is called: .IP .nf .fam C .B adepyf \[aq]&f;\[aq] adepyf: ERROR: frame#0: code failed to execute (Undefined subroutine &main::f called at (eval 5) line 1.) adepyf: ERROR: frame#1: application\[aq]s entry function failed .fam T .fi .PP This second example shows the importance of returning sensible return codes: .IP .nf .fam C .B adepyf \[aq]sub f { &ade_err_error($errstack_ref, ade_err_misc, \[dq]this is a test\[dq]); }; &f;\[aq] .fam T .fi .PP (Failure to return .B $ade_err_fail meant that no need to dump the error stack was detected, so there was no output, despite an error frame having been added to the error stack.) This third example makes the same call but with the right return code: .IP .nf .fam C .B adepyf \[aq]sub f { ade_err_error(errstack, \[dq]de_err_misc\[dq], \[dq]this is a test\[dq]); return ade.ade_err_fail; }; &f;\[aq] adepyf: ERROR: frame#0: this is a test adepyf: ERROR: frame#1: code executed, but returned non-zero (1) adepyf: ERROR: frame#2: application\[aq]s entry function failed .fam T .fi .PP This fourth example makes the same call but having first configured the stack dumper to dump only the top frame: .IP .nf .fam C .B adepyf \[aq]sub f { &ade_err_error($errstack_ref, ade_err_misc, \[dq]this is a test\[dq]); return $ade_err_fail; }; &ade_err_resetstack($errstack_ref, dumpall=>0); &f;\[aq] adepyf: ERROR: this is a test .fam T .fi .ne 5 .SH CAVEATS None. .br .ne 5 .SH STANDARDS This manual page documents version ADE_APP_TOKEN_RELEASE_ID of .B adepyf\fR. .br .ne 5 .SH SEE ALSO adeshf(1), ade-config(1) .br .ne 5 .SH AUTHOR ADE_APP_TOKEN_AUTHOR_NAME .br .ne 5 .SH COPYRIGHT & DISTRIBUTION POLICY Copyright (C) 2003-ADE_APP_TOKEN_RELEASE_YEAR ADE_APP_TOKEN_AUTHOR_NAME \*[ade_standard_copyright_component]