|
From: Jim B. <jim...@py...> - 2015-03-27 03:37:54
|
David, Thanks for reporting this! As you mention, support for PYTHONSTARTUP is currently missing from Jython, but it could be readily added in a future release (hopefully 2.7.1, but always a question of prioritization). In the meantime, you could use sitecustomize (see http://pymotw.com/2/site/#sitecustomize for a good description on how to use this support), and use that check for the PYTHONSTARTUP environment variable. But the challenge here is to determine if the session is interactive or not. In CPython, you can do by checking hasattr(sys, "ps1"), but sys.ps1 is always defined currently in Jython, regardless if interactive or not. (Should be fixed as well.) There may be another way of performing this check, but I'm not aware of it at this time. Please feel free to file bugs at http://bugs.jython.org/ - Jim On Wed, Mar 25, 2015 at 10:57 AM, David Charles <dav...@gm...> wrote: > I have installed this to Jython: > > * https://github.com/darius/columnize > > And I would like to make it automatically available to all of my > interactive Jython sessions. However, Jython does not seem to respect > PYTHONSTARTUP (nor JYTHONSTARTUP). > > I have found that I can arrive at nearly the same effect if I add the > necessary statements to ~/.pythonrc.py and then execute: > > >>> from user import * > > However, I would like to be able to type nothing at all. > > Suggestions? > > David > > > > ------------------------------------------------------------------------------ > Dive into the World of Parallel Programming The Go Parallel Website, > sponsored > by Intel and developed in partnership with Slashdot Media, is your hub for > all > things parallel software development, from weekly thought leadership blogs > to > news, videos, case studies, tutorials and more. Take a look and join the > conversation now. http://goparallel.sourceforge.net/ > _______________________________________________ > Jython-users mailing list > Jyt...@li... > https://lists.sourceforge.net/lists/listinfo/jython-users > > -- - Jim jim.baker@{colorado.edu|python.org|rackspace.com|zyasoft.com} twitter.com/jimbaker github.com/jimbaker bitbucket.com/jimbaker |