|
From: <bc...@wo...> - 2001-11-01 15:11:10
|
[Phil Surette] >I was hoping to do a lazy initialization thing. > >I'm open to suggestions as to how to do it... >I haven't actually written anything yet and I'm working >on writing some jython tasks for ant first. On that note, if anyone feels like writing an ant task to invoke the jythonc compiler it would be quite a usefull. >My thoughts were to create a class that implements all the >dictionary things - __getitem__ etc - and populate >the dictionary the first time any of these are called. Good. Maybe we should add a system property to completely disable all attempt to fill os.environment. I can image there is environments where a security manager does not allow calls to Runtime.exec(). >By cribbing from ant I should be able to put in support >for a read-only environment for unices and win32. That's fine for a start. Beyond win&unix we have to let users send patches for their own platforms anyway. Does anyone know how ant decide that it is running on unix? >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. regards, finn |