|
From: dman <ds...@ri...> - 2001-11-01 15:26:32
|
On Thu, Nov 01, 2001 at 03:14:17PM +0000, Finn Bock wrote:
| [Phil Surette]
| >I haven't thought writing through yet, but I figure
| >reading will hit a large percentage of the use cases.
|
| Writing is normally done by inserting values in the os.environment dict
| and using that dict for the os.system() call. We can't possibly do any
| better in core jython.
How does os.setenv() figure into this? I imagine that this operation
is probably not possible in Java, thus the call should either silently
ignore it, or raise an exception.
I was thinking that, perhaps, some environment values can be gotten
from Java directly. For example,
print os.eviron[ "HOME" ]
could be the same as
System.out.println( System.getProperty( "user.home" ) ) ;
though on some JVMs, user.home is really messed up (ex, jdk1.1.8 on
win). I think Java ignores the user's preferences (ie setting $HOME
in bash or cmd.exe) and using whatever it feels like, so this may not
be a good idea.
-D
|