On Fri, Aug 2, 2019 at 5:49 PM Calvin Buckley <calvin@xxxxxxxxxx> wrote:

It's worth noting that the PASE libc "syslog" function (which Python
most likely wraps) will output to the system operator log, given enough
of a fatal condition.

Python does wrap `syslog`. Your C example would look like this in Python:

```python
import sys
import syslog

syslog.syslog(syslog.LOG_ALERT, sys.argv[1])
```

Unfortunately, this isn't the job log, but perhaps the right flags
passed to syslog will elicit something. I'd have to cross-reference
PASE specific documentation to be sure.

It's worth being aware of, and it could be handy for some folks, in
some situations.

Mainly, I wanted something which the Python programmer wouldn't have
to specifically account for. That is, the Python code should ideally
look like regular, old, cross-platform Python code. "Normal Python
scripters" don't really use syslog, especially if they're on Windows.

The suggestion to make QSH send an escape message upon return code
other than zero pretty much nails my requirements, because unexpected
Python exceptions will result in a return code of 1. And this is
incredibly easy to implement. (Add one line to my
simplest-thing-that-could-possibly-work CLP Python wrapper.)

My super-nice-to-have feature would be for Python calls to be wrapped
in such a way that stderr (which is where the tracebacks go, by
default) goes into the text of a CPF9898. I got the feeling that
Richard's more elaborate Python wrapper could probably be adapted to
do this.

John Y.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2019 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].