From: Jim B. <jim...@py...> - 2018-09-08 23:45:52
|
+1 on both of these updates, they look good and highly useful. On Sat, Sep 8, 2018 at 12:13 PM, Jeff Allen <ja...@fa...> 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 > Jyt...@li... > https://lists.sourceforge.net/lists/listinfo/jython-dev > |