.\" $HeadURL$ $LastChangedRevision$ .\" vim: filetype=nroff .\" .TH ADEPYF 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 code .br .ne 5 .SH DESCRIPTION .B Adepyf provides a command line interface to the ADE Python library. .I code should return. .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 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: .IP .nf .fam C .B adepyf \[aq]import time; import ade; rc=ade.lck_lock(errstack, \[dq]/tmp/x.lock\[dq]); return rc if rc != ade.ok else [ print(time.strftime(\[dq]%Y-%m-%d %H:%M:%S\[dq])), time.sleep(10), print(time.strftime(\[dq]%Y-%m-%d %H:%M:%S\[dq])), ade.lck_unlock(errstack, \[dq]/tmp/x.lock\[dq])ade.ok ][-1]\[aq] .fam T .fi .PP See also CAVEATS below. .ne 5 .SH CAVEATS Python uses indentation to group control-flow; therefore .I code may need to convoluted. As such, .B adepyf is not terribly useful. .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 adeperlf(1), 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]