Re: JYTHONSTARTUP and PYTHONINSPECT

Jim Baker <[email protected]>
Newsgroups gmane.comp.lang.jython.devel
Message-ID <CAOhO=aONEBrmjO+3spdNBsq2mZrqExkbKVbwkqmEe7pTuXEX7w@mail.gmail.com>
+1 on both of these updates, they look good and highly useful.

On Sat, Sep 8, 2018 at 12:13 PM, Jeff Allen <[email protected]> wrote:

> I'm remodelling jython.run along the lines of CPython main for clarity and
> conformity. CPython supports a couple of environment variables it has been
> easy to include. They seem useful, but are maybe not quite done in the
> Jython way. I'm not totally sure whether they should be JYTHONsomething or
> PYTHONsomething, or be registry entries instead, or as well. I'm canvassing
> opinions.
>
> Historically, our policy appears to be that configuration should be done
> via the registry (the registry files and the -D options). We *always* label
> registry items in the style "python.some.thing". We also honour some
> environment variables and mostly call them JYTHONsomething, except there's
> also PYTHONWARNINGS and PYTHONIOENCODING, I suppose because you want to see
> the same values as CPython (I think).
>
> I propose:
>
> JYTHONSTARTUP (registry python.startup) a file to run at the start of an
> interactive session. *J*YTHONSTARTUP because your script is unlikely to be
> the same for CPython. Precedence as with other variables.
>
> PYTHONINSPECT (registry python.inspect) if not empty, effectively sets the
> -i flag. (Any of these sources will *set* the flag, but none can turn it
> off.) It's called *P*YTHONINSPECT because setting it during execution
> should make us drop into interactive mode, instead of exiting, when the
> first SystemExit is raised. A script that does so may not be aware it's in
> Jython, so I favour the standard Python name.
>
> Jeff
>
> --
>
> Jeff Allen
>
>
>
> _______________________________________________
> Jython-dev mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/jython-dev
>

_______________________________________________
Jython-dev mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jython-dev
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.