|
From: brian z. <bz...@zi...> - 2001-11-15 02:22:29
|
Well I'm a pessimist and I have the first bug in javaos.py. I'm on a Win2K box running Cygwin bash and when I execute `env` I get the following (abbreviated for readability): WINDIR=C:\WINNT USERPROFILE=C:\Documents and Settings\brian zimmer PS1=\[\033]0;\w\007 \033[32m\]\u@\h \[\033[33m\w\033[0m\] $ ANT_HOME=//d/java/third/apache/jakarta-ant-1.3 PROGRAMFILES=C:\Program Files USER=bzimmer You'll notice the PS1 variable wraps to a new line and causes a ValueError to be thrown: Jython 2.1b1 on java1.3.0 (JIT: null) Type "copyright", "credits" or "license" for more information. >>> import os >>> os.environ Traceback (innermost last): File "<console>", line 1, in ? File "d:\home\development\sourceforge\jython\Lib\javaos.py", line 127, in __repr__ File "d:\home\development\sourceforge\jython\Lib\javaos.py", line 122, in _LazyDict__populate File "d:\home\development\sourceforge\jython\Lib\javaos.py", line 273, in _getEnvironment ValueError: substring not found in string.index >>> For the moment I've just wrapped it in a try/except block but then the value of the PS1 variable is truncated in the .environ dictionary. thanks, brian > -----Original Message----- > From: jyt...@li... > [mailto:jyt...@li...] On Behalf Of Finn Bock > Sent: Wednesday, November 14, 2001 12:49 PM > To: jyt...@li... > Subject: Re: [Jython-dev] updated javaos.py > > > [Kevin] > > >But I just realized I should have started the stderr-reading thread > >before reading stdout, so that we don't see all of stdout > before seeing > >any of stderr. > > > >Sorry about that! Hopefully no more changes to this for a long time. > > Ohh, you are such an optimist. > > Don't worry about changes; development is what we do here. I > feel the fundamentals is fine, the details can be straighten > out over time and with user feedback. If you are volunteering > to deal with the feedback and questions, I will gladly commit > the patches. > > >Here's the patch: > > Has been committed. > > regards, > finn > > _______________________________________________ > Jython-dev mailing list > Jyt...@li... > https://lists.sourceforge.net/lists/listinfo/j> ython-dev > |